Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.os.vms    |    DEC's VAX* line of computers & VMS.    |    264,096 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 263,032 of 264,096    |
|    Lawrence =?iso-8859-13?q?D=FFOlivei to All    |
|    Re: extending MySQL on VMS    |
|    19 Aug 25 03:00:22    |
      From: ldo@nz.invalid              On Mon, 18 Aug 2025 21:49:29 -0400, Arne Vajhøj wrote:              > On 8/18/2025 7:59 PM, Lawrence D’Oliveiro wrote:       >>>       >> On Mon, 18 Aug 2025 19:48:16 -0400, Arne Vajhøj wrote:       >>>       >>> On 8/18/2025 7:45 PM, Lawrence D’Oliveiro wrote:       >>>>       >>>> Parentheses are best used lightly -- where needed, maybe a little       >>>> bit more than that, and that’s it.       >>>>       >>>> Otherwise parenthesis clutter introduces its own obstacles to       >>>> readability.       >>>       >>> That is not the mantra among people who try to prevent future       >>> errors.       >>       >> There are people who just repeat what they are told, aren’t there,       >> instead of learning from actual experience.       >       > It is the recommendation from people with actual experience.       >       > One book that recommend it is "The Practice of Programming".       > Brian Kernighan and Rob Pike.              One wonders how much experience they really have, across how many       different languages.              For example, consider some Lisp code. Here is a function of mine, not       laid out the way I would usually write it, but in something       approximating traditional Lisp layout:               (defun cur-line (ensure-newline)        (mstr        "returns list of two character positions, representing the"        " beginning and end of the selection if there is one, else"        " the beginning and end of the current line. ensure-newline"        " => ensures there is a newline at the end of the line.")        (let (beg end)        (cond        ((use-region-p)        (setq beg (min (point) (mark)))        (setq end (max (point) (mark))))        (t (save-excursion        (setq beg (search-backward "\n" nil t))        (cond        (beg (setq beg (+ beg 1)))        (t (setq beg (point-min))))        (goto-char beg)        (search-forward "\n" nil 1)        (setq end (point)))))        (when ensure-newline        (deactivate-mark)        (goto-char end)        (unless (eq (char-before) 10)        (insert "\n")        (setq end (point))))        (list beg end)))              Here is the way I actually lay it out:               (defun cur-line (ensure-newline)        (mstr        "returns list of two character positions, representing the"        " beginning and end of the selection if there is one, else"        " the beginning and end of the current line. ensure-newline"        " => ensures there is a newline at the end of the line."        )        (let (beg end)        (cond        ((use-region-p)        (setq beg (min (point) (mark)))        (setq end (max (point) (mark)))        )        (t        (save-excursion        (setq beg (search-backward "\n" nil t))        (cond        (beg        (setq beg (+ beg 1))        )        (t        (setq beg (point-min))        )        ) ; cond        (goto-char beg)        (search-forward "\n" nil 1)        (setq end (point))        ) ; save-excursion        )        ) ; cond        (when ensure-newline        (deactivate-mark)        (goto-char end)        (unless (eq (char-before) 10)        (insert "\n")        (setq end (point))        ) ; unless        ) ; when        (list beg end)        ) ; let        ) ; defun cur-line              Which would you prefer?              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca