Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
You know what, sure, I'll take it. But then drop the parens too.
if amount !>= 0 {
} -
I never understood why the CTL operators A and E prefix expressions and not operators. `AG p`, `EX p`, `AF p`, these work either way because G, X and F are prefixes themselves, but `p U q` is an infix and IMO the natural way to extend it to CTL would be `p EU q` and not `E(p U q)`which is the standard form.
-
I had a similar thought for my own programming language.
Why not allow `obj.!is_foobar()` instead of `!obj.is_foobar()`
Also Zigs postfix dereferencing (`obj.*`) is pretty nice! -
@12bitfloat that's a cool idea, I may steal it in some form. After a bit of thinking, I think it plays perfectly with Orchid's existing preprocessing capabilities, and it can accommodate this syntax abomination which computes the negative normal of a vector with a dynamically dispatched function and shadows the original (FP loves shadowing):
let direction .-= normalized
This is of course not intended use, but both of these are:
let direction .= normalized
direction.-normalized
and there's no point in artificially limiting how deep these can stack as long as the ordering of the modifiers is unambiguous. -
Surely this won't produce an undecipherable mess of abstractions that say less than they should like Haskell did. Maybe I should stick to practical FP since the niche of impractical metaprogramming circlejerk is already overfull.
-
why do i feel like going to dfox's house in US, go into his server room and burn the memory disk that is hosting this post and associated comments? i am not that violent
-
I like the idea because it would allow
if collection.!isEmpty
to read as "if collection not is empty"
vs
if !collection.isEmpty
"if not collection is empty"
both are wrong but the first one feels less wrong 😄 -
@Lensflare You can also define an object for all sorts of boolean attributes and instantiate it on objects as "is" so you can have
array.is.!empty -
We3D26892y@Realjase probably by pure inertia. a line does not feel complete without ';'. I catch myself here and there wanting to put it in normal text ( mainly @ work ) so it compiles better from the receiving side :D
-
@Realjase it should work in C, C++, and C#. The semicolon after the condition is an empty statement. I used that in place of the empty block used in the OP.
-
@Realjase it's legal but hopefully you have configured your compiler to error out because of it since the semicolon is easy to overlook.
if(amount !>= 0){ }
rant