Parameterized Keywords
Bob the Viking via Digitalmars-d
digitalmars-d at puremagic.com
Mon Mar 7 19:00:58 PST 2016
On Monday, 7 March 2016 at 20:54:22 UTC, Patience wrote:
> On Monday, 7 March 2016 at 15:09:48 UTC, Lass Safin wrote:
>> On Monday, 7 March 2016 at 05:56:54 UTC, Patience wrote:
>>> int[size] <- creates an integer of size bits.
>>
>> You declare arrays of integers with int[size], you know that,
>> right?
>
> No, not right. Think again. Get your mind out the gutter.
> Making your own assumptions about what I am talking about can
> get you in to trouble. Only in programming languages were
> int[size] is interpreted as an array does it mean that.
>
>> And I really don't see any useful improvement, that could be
>> added with this. It would just be wasted efforts.
>
> You sound very intelligent!!! I'm sure glad I asked you before
> I asked god since you seem to know everything about everything.
> Thanks for the input! I will simple cease to think about
> progress from now on since you have decided that no progress
> can be made.
>
> Thanks again brother!
Now listen up, you retarded piece of gutter slime. You are
posting a newsgroup for D, a language in which int[N] does indeed
indicate an array of N ints. If that's too hard for you to grasp,
may I suggest you take up gardening or DIY lobotomy?
While your first post contained what might be interesting ideas,
your complete lack of understanding of what might be a fruitful
debate makes me skeptical of them, you, and the future of the
entire human race. Congratu-fucking-lations.
You have five ideas in your opening post, with limited
explanations for two of them.
Let's start with those two, because it's actually possible to
divine what they do. I'm going to stay within the D universe,
since I like it here, and it gives us at least some modicum of
solid ground.
== foreach[?] ==
Where is '?' defined? Is it a property of the object being
iterated over? Is it a global (dog forbid)? Is it just plain
magic, and you're too stoned to make a sensible explanation?
'executes only if there are one or more iterations'. Just like
every fucking other foreach, then. What in Wotan's beard would it
otherwise do with an empty list? Or does it somehow only run
once, so as to make programming even easier to grasp?
'checks for nullity'. At what bloody level? Suppose there's a
foreach[?] (a.b.c.allthefuckingletters.ð.ü) - is every single one
checked? When does it check? Suppose allthefuckingletters above
suddenly becomes ñúll - does this thing crash? Turn the universe
into soup?
== int[size] ==
I'm going to pretend I didn't see this. It's a feature that
exists for small N in D, C, C++ and probably other languages.
They're called bitfields and are as old as the mountains (unless
you're a young-earth creationist, in which case they're older).
So, onto your other ravings:
== for[32] ==
What the bloody fuck is this abomination? Like above, who has the
power to redefine the number 32? Is this some Smalltalk inspired
thoughtbleed where I can change the metaclass of the number 32
and give it new features? Can I make it a prime?
Without any kind of explanation, this thing is just weird. I
can't for the life of me imagine what it'd do, why anyone'd do
it, or why anyone would even think it up in the first place.
== switch[alpha] ==
Now we might conceivably be getting somewhere. So this turns
'switch' into a black box that may or may not behave like you
expect to, depending on how junior and/or crazy the implementer
is?
I can imagine implementing faster struct comparisons in switch
statements, and one might even use this to do some interesting
ADT stuff. But even then, why do I need to specify the type? It's
right there in the argument to switch.
== if[x](x < 32) ==
See this? This is what madness is made out of. This thing says 'I
pretend to compare x to 32, but I'm actually downloading horse
porn and telling your girlfriend it's yours'. It says 'screw you
and your boolean logic!'. This thing is literally Stalin reborn
as Hitler.
See, it's not redefining comparison, it's redefining causality.
This is quantum computing gone bad. What in the name of
Shub-Niggurath could this possibly do that isn't bad? At least
with 'switch' there are optimization possibilities, and maybe
some ADT stuff. Redefining 'if' is like Grassmann numbers or
Discordianism. Down this path lies chaos.
More information about the Digitalmars-d
mailing list