Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

Re^2: Stupid mistakes I repeatedly make

by TimToady (Parson)
on Apr 05, 2005 at 02:18 UTC ( #444840=note: print w/replies, xml ) Need Help??

in reply to Re: Stupid mistakes I repeatedly make
in thread Stupid mistakes I repeatedly make

Well, hey, at least they'll be different stupid mistakes. I was reassured by most of the articles on this thread that Perl 6 will prevent most of the mistakes that people make in Perl 5. The only red flag I saw was how semicolons sneak into lists sometimes, so I'm thinking about how to keep that from becoming tragic in Perl 6. Currently it would turn the list into a list of lists, which is not likely to return a useful diagnostic. Probably we'll fix it by only differentiating semicolon from comma if bound to an array of Lazy lists. Otherwise we can just make it behave like a strange looking comma, which will effectively be a no-op if you accidentally type it at the end of a list.
  • Comment on Re^2: Stupid mistakes I repeatedly make

Replies are listed 'Best First'.
Re^3: Stupid mistakes I repeatedly make
by rg0now (Chaplain) on Apr 05, 2005 at 08:58 UTC
    I am not entirely sure I get your point. You mean that if you mistype the comma in
    @array[10, 42]
    (which would be just two elements of @array similar to Perl5) and accidentally change it to a semicolon
    @array[10; 42]
    then you get a multi-dimensional array? Do arrays automatically promote to multiple dimensions? If this is the case, then it is indeed a call for stupid mistakes, which are hard to uncover...

    By the way: for me at least Perl 6 native multi-dimensional arrays do not seem to be essential. I mean they are pretty nice, but I could definitely live without them in Perl 6.0.0. At least, poor autrijus might have some less sleepless nights implementing hard-to-implement-only-marginally-useful language features...:-)


Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://444840]
[atcroft]: james28909: That particular questions was a bit of trick, actually (depending on the country you are in). More interesting is, if you are trying to subtract from an epoch time, for instance, you might have to consider when/if DST occurs for a location,
[atcroft]: because you may have to adjust the number of seconds you change from an epoch from 86400 (not to mention leap seconds)....
[atcroft]: james28909: Although if your program is using a database, you might be able to "pass the buck" to the database and ask it to do the date change for you....
[stevieb]: ++ atcroft

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (2)
As of 2017-04-29 04:40 GMT
Find Nodes?
    Voting Booth?
    I'm a fool:

    Results (531 votes). Check out past polls.