Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^2: Porting (old) code to something else [Perl 6 whitespace rules are annoying!]

by Tux (Canon)
on Feb 18, 2015 at 19:45 UTC ( [id://1117133]=note: print w/replies, xml ) Need Help??


in reply to Re: Porting (old) code to something else [Perl 6 whitespace rules are not illogical!]
in thread Porting (old) code to something else

And in this particular case (Slang::Tuxic) we're talking about one that adds ambiguity to the grammar (as its README readily admits), which is imo an additional red flag.

If not doing any dangerous things that cross the (thin) line, I don't see a problem (other than having others maintain the code later).

So yeah, if FROGGS had fun writing the slang and you have fun using it while learning Perl 6, more power to you, but I would advise against using something like this in production code.

I have full confidence that slangs are implemented safe enough to not leak into userland. IMHO perl6 is not yet ready for "production code" in the coming few months, but it is going there fast!

<vlockquote>Better to embrace the design of the programming language you're working with and try to learn and discover the most elegant ways to do things within that design, rather than bracing yourself against it and trying to force the language into the habits you carried over from other languages.

If I percieve this "elegance" as illogical and ugly, I won't use the language at all. at all. As said, part of programming is having FUN! And if if I amm annoyed on every line I write in whatever programming language, I will not have FUN and I will stop using that language (unless payed for by a factor many multiplies of my current sallary).

You also use the word "habits". If you have taken the time to read my reasoning (and I do not expect you to agree), you will at least see that it meets a logic. Maybe not your logic, but it is consistent. I took a lot of time to think this over, together with my fellow students.

You probably underrate the influence of the flexibility of how a programming language can match the train of thoughts of a programmer. Perl5 is EXCELLENT in supporting this. Perl6 matches this in programming rules and flexibility in the language, but NOT in the flexibility in style. That has put me off. So much that it tool Slang::Tuxic to bring me back.

You say it is important for the language to give programmers a way to disambiguate clearly between syntax constructs. I disagree. It is not important for the programmer, but for the language interpreter/compiler. The programmer writes it the way he or she understands the problem. It is his/her task to write it in a way the interpreter/compiler will do what the programmer intended the code to do. IMHO it is very counterproductive to write in a way that your mind doesn't understand, just to match the language rules.

The no whitespace before paren rule is likely to work for the majority of (fresh) programmer who learned it like that, but you will have to accept the fact that it also works opposite to other programmers (like me), who do NOT recognize it the way you see it, but only see "ugly code" and are annoyed.


Enjoy, Have FUN! H.Merijn
  • Comment on Re^2: Porting (old) code to something else [Perl 6 whitespace rules are annoying!]

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1117133]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (3)
As of 2024-04-19 23:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found