|
Wow, I like it, it is wonderful Yes, it is a bit unnatural.
By the way, for I while I thought it was Lua . However Lua output would have had more respect for the data structure.
Veni, vidi, vici.
|
|
|
|
|
What were you expecting?
The reasonable man adapts himself to the world; the unreasonable man adapts the world to himself.
Therefore all progress depends on the unreasonable man.
- George Bernard Shaw
|
|
|
|
|
A compiler error would have been nice...
The only instant messaging I do involves my middle finger.
English doesn't borrow from other languages.
English follows other languages down dark alleys, knocks them over and goes through their pockets for loose grammar.
|
|
|
|
|
?! On my machine it runs and does exactly what expected...
What do you want a compiler error for?!?!
|
|
|
|
|
To stop people doing it...if you declare something as a 2D array, then being able to use it as a 1D array is just...nasty...and it opens all sorts of "future behaviour" problems. Although MSDN does say "You can do this"[^] it doesn't lay down in stone the order in which such elements will be processed - which means that it could chanmge in future .NET releases, or be different between .NET and Mono for example.
It's just a trick - not something you should do in "real" code.
The only instant messaging I do involves my middle finger.
English doesn't borrow from other languages.
English follows other languages down dark alleys, knocks them over and goes through their pockets for loose grammar.
|
|
|
|
|
OriginalGriff wrote: It's just a trick - not something you should do in "real" code.
There is all sorts of stuff like that though.
I would say that younger developers get the notion that once they 'learn' a new idiom that they start looking for places where it can be applied without any thought as to the maintenance cost or real applicability.
Of course I have seen developers into at least their late 30s doing that as well. And defend the usage as ideal based on rationalizations that it requires fewer lines and that real developers should understand that code anyways. Never seen a rationalization that actually supported delivering code though.
|
|
|
|
|
Had it been a jagged array int[][] numbers = { new int[] { 11, 21, 31 }, new int[] { 12, 22, 32 }...
I would expect and is getting an error.
The reasonable man adapts himself to the world; the unreasonable man adapts the world to himself.
Therefore all progress depends on the unreasonable man.
- George Bernard Shaw
|
|
|
|
|
I agree - but the code does what it says (if you get me) i.e. for each integer in the collection of numbers ... It's sort of spookily nice.
MVVM # - I did it My Way
___________________________________________
Man, you're a god. - walterhevedeich 26/05/2011
.\\axxx
(That's an 'M')
|
|
|
|
|
programming questions need to get addressed to Christan Grausss.
However, yes it looks crap - i recommend you quit writing code like that
Bryce
MCAD
---
|
|
|
|
|
What is the (missing) problem exactly?
You might not be alone, but this doesn't steer any emotion other than indifference to me...
modified 30-Oct-13 23:47pm.
|
|
|
|
|
Just needs more line feeds is all.
At least it doesn't use var .
|
|
|
|
|
OriginalGriff wrote: Am I alone in thinking that's really nasty and unobvious? The way all code should be
-- RP
|
|
|
|
|
|
you're in the wrong forum
|
|
|
|
|
Hi Peter,
Please do not post programming questions in The Lounge. Use the Q/A Section[^].
Also please use the "code" feature (from the toolbar) for your code, so that it can be readable.
And do not cross-post, be patient and someone will answer your question. You cannot ask the same question at multiple places.
|
|
|
|
|
What part of "if you need specific help please use the programming forums." did you assume did not apply to you?
The only instant messaging I do involves my middle finger.
English doesn't borrow from other languages.
English follows other languages down dark alleys, knocks them over and goes through their pockets for loose grammar.
|
|
|
|
|
"Scientists have found a planet way out in the cosmos that's close in size and content to Earth - an astronomical first.
But hold off on the travel plans. This rocky world is so close to its sun that it's at least 2,000 degrees hotter than here, almost certainly too hot for life."
If it's 2000 degrees hotter, how the f*ck does that qualify as "earth-like"?That's like saying Europa is "earth-like" because it's freakin' round. But whoa up there, big fella. Europa has no atmosphere, is covered in frozen methane, and it doesn't really get any heat from the sun.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
Link?
The only instant messaging I do involves my middle finger.
English doesn't borrow from other languages.
English follows other languages down dark alleys, knocks them over and goes through their pockets for loose grammar.
|
|
|
|
|
the size and composition make it earth-like.
they've been finding mostly giant gas planets.
|
|
|
|
|
Chris Losinger wrote: giant gas planets
Sounds like planet populated by politicians and lawyers
Common sense is admitting there is cause and effect and that you can exert some control over what you understand.
|
|
|
|
|
Chris Losinger wrote: they've been finding mostly giant gas planets
So, they finally found JSOP's ex-wife ?
I'd rather be phishing!
|
|
|
|
|
Nope, there's way to much heat there to be my ex-wife (she has all the warmth of a glacier), but good joke.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
It's more like saying that west Texas is earthlike
Sent from my BatComputer via HAL 9000 and M5
|
|
|
|
|
Quote: almost certainly too hot for life Life as we know it, that is.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
Sounds like a bunch of egg-heads who will never produce anything useful are trying to appear relevant.
|
|
|
|