perl6 too much pointless functionality - Page 3

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

Re: perl6 too much pointless functionality

Quoted text here. Click to load it

That's not really an example for 'new syntax' as the core is about
calling a builtin method on a list object. And writing

@newlist = shuffle(@list)

doesn't make much of a difference. It also doesn't quite fit into the
original example. What I was trying to get at is that 'syntax' is a
necessary evil when using feature of a programming language and in
itself, it doesn't matter (this is not so much different from natural
languages --- I didn't wrote "it doesn't matter" because I'm specially
in love with the sequence of graphemes but because it can be used to
express a meaning I wanted to express. Were "Fischer Fritz fischt heut
nix", I'd use that instead).

Re: perl6 too much pointless functionality

El 22/08/14 a las 17:29, Rainer Weikusat escribió:
Quoted text here. Click to load it

Of course it is new syntax.

1) The dot changes it's function
2) pick is a new method which could return one element of a list or
3) (*) refers to the whole list

"Syntax" comes from Ancient Greek σύνταξις "coordination" from σύν syn,  
"together," and τάξις táxis, "an ordering"


Re: perl6 too much pointless functionality

Quoted text here. Click to load it

That's a syntactical change compared to Perl,  OTOH, C has used . in
this way for an eternity and the same is also true for C++. Java got it
from there but dropped the separate 'dereferencing access' operator (->)
Perl adopted after some time for 'dereferencing accesses'. In this
respect (and in a few others), Perl6 is more like Java than Perl and one
of the justifications for that was actually "why use -> when everyone
else uses .".  But "what everyone else does" can obviously not be
regarded as new and in any case, you wrote about 'shuffling a list'
which would be the method call and possibly also the adoption of
'everything is an object' as design principile, thus enabling method
calls on arrays. And neither 'design principles' nor 'standard library
routine' are 'syntax'.

As to using the . as 'subordinate component access operator'
(suggestions for a better term very much welcome), that's actually a
nice demonstration of the ultimate irrelevance of 'syntax', some
people's apparent obsession with that notwithstanding: Object and method
call have to be associated with each other in some way so that a
compiler or interpreter can locate both. Usually, an in itself
meaningless operator symbol will be used for that, but if this ends up


really doesn't matter: It's gotta be something and someone using the
language has to learn it but ultimatively, it exists to enable a machine
to disambiguitate the text.

To a degree, it also exists to facilitate communication about
algorithms among humans but considering that programming languages are
plenty and new arrangments of non-alphanumerical characters in order to
accomplish the same thing are constantly being invented, forgotten and
re-invented, programming languages can't really serve that purpose,
especially considering that they - in addition to the funny character
combination rules - usually also come with their own terminology for
talking about funny character combinations.

Site Timeline