Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 6 Apr 2010 21:07:17 -0600
From:      Chad Perrin <perrin@apotheon.com>
To:        freebsd-questions@freebsd.org
Subject:   Re: perl qstn...
Message-ID:  <20100407030717.GA26298@guilt.hydra>
In-Reply-To: <20100406132049.641b9edf@gumby.homeunix.com>
References:  <86aatjnsts.fsf@red.stonehenge.com> <861vevnsow.fsf@red.stonehenge.com> <j2ya14066a01004040945z39191770k2f025752317fb14a@mail.gmail.com> <20100404163353.GA15198@guilt.hydra> <20100404201442.b456044e.freebsd@edvax.de> <o2oa14066a01004041148zd4ef8167q32b04d58daec8f9f@mail.gmail.com> <4BB9A5ED.3040309@infracaninophile.co.uk> <20100405173632.739a0c42@gumby.homeunix.com> <20100406015544.GA21119@guilt.hydra> <20100406132049.641b9edf@gumby.homeunix.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--G4iJoqBmSsgzjUCe
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Apr 06, 2010 at 01:20:49PM +0100, RW wrote:
> On Mon, 5 Apr 2010 19:55:44 -0600
> Chad Perrin <perrin@apotheon.com> wrote:
>=20
> > On Mon, Apr 05, 2010 at 05:36:32PM +0100, RW wrote:
> > >=20
> > > IMO this is a bad mistake that other languages were quite right not
> > > to copy - a test shouldn't come after a block of code unless it's
> > > evaluated after the block (as in repeat...until)=20
> >=20
> > There are more things in heav'n and earth, Horatio, than are dreamt
> > of by designers of eagerly evaluated prefix notation languages.
>=20
> And most of them are obscure for good reasons. Just because a a syntax
> fits into a classification scheme doesn't make it a good idea.

The fact something is popular doesn't mean it's a good idea.

Shall we trade more trite sniping, or would you like to say something
more substantive?  In no way, and at no time, did I imply that using
"unless" like an infix operator is a good idea just because it fits with
a given syntax classification.


>=20
> Natural languages are mostly driven by spoken usage, in which people
> firm-up half-formed ideas as they speak - this is not a good model for
> programming languages. If you are hacking out a quick and dirty script
> it may be convenient to type the decision after the action, but it
> don't I think it promotes good quality software.

This sounds exactly like the complaints Pythonistas use to explain why
they have a deep hatred of Perl.  If that's how you feel, I'd prefer you
stop trying to tell me how Perl should work, and just use something else.


>=20
> Imperative languages have a natural order of decision followed by
> action, and code is most easily readable if the syntax doesn't try to
> subvert that. =20

=2E . . except when the "natural order of decision" varies significantly,
such as when comparing functions with operators.  It gets even more
confusing when both "functions" and "operators" are actually methods in
object oriented languages with an imperative design, because suddenly the
difference between a "function" and an "operator" becomes purely
arbitrary.  There's nothing about arbitrariness that suggests a "natural
order".

It's kind of odd you rail against natural language then talk about
imperative languages having a "natural order" -- which is, presumably,
based on the expectations of people who have been conditioned to think
that way by their use of natural language.

Frankly, if everybody just stuck to a purely "natural order of decision"
approach to imperative language design, we would never even have
developed structured programming.

--=20
Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ]

--G4iJoqBmSsgzjUCe
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (FreeBSD)

iEYEARECAAYFAku79uUACgkQ9mn/Pj01uKVyJwCfReaawkwSRNi26PGa0KsW0sLq
ckQAnjaauMONpPZxsULf74Rw5aUK5kGP
=fNMY
-----END PGP SIGNATURE-----

--G4iJoqBmSsgzjUCe--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100407030717.GA26298>