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
Search - "syntax sugar"
-
Karma...you're the best.
An ex-team member was complaining to me about his manager reviewing his code. Shortened version of the convo:
Mgr: "Why didn't you use the new C# built-in extension methods?"
Dev: "No reason. I thought using the straight forward approach would be easier to maintain"
Ha!..you conceded, arrogant mother <bleep>er. How many times did I have to listen you berate other developers in code reviews for not using some random C# syntax sugar? Comments like "If you bothered to read the new C# 7.0 language specification like I did...you would have known not to use the string.Format anymore..."
Now you're pissed that the manager embarrassed you? How does it feel d-bag?
That's too evil...so I simply responded "I don't think Nick meant anything negative about your code, he's just trying to help."
Seeing him stir around all pissed off does make me giggle like a little schoolgirl.7 -
The more I play with C, the more I realize why many people hate C++.
I like the amount of control and the simplicity. No unnecessary syntax sugar, and the code is very straightforward to read.11 -
!rant
In the office, sometimes we order food for lunch.
Me: *goes outside the office to make the call*
*Coding partner arrives while I'm on phone*
Me: *realize that I forgot to ask him if he wanted food* Hey dude, do you want to order something?
Him: *thinks* Nah, I'm fine, I brought my own lunch
Another Guy: That's good because we already called!
Me: Yeah, but it doesn't matter, I can call and tell them "Order++"
Him: Nah dude, tell him "++order", because maybe he'll bring the orders then go back and realize that he missed one
<<<<
I don't know, it was funny for me 🤷♂️1 -
Who thought Lua was a good idea for extending gameplay functionality??
It's weakly typed, has no OOP functionality and no namespace rules. It has no interesting data structures and tables are a goddamn mystery. Somebody made the simplest language they could and now everybody who touches it is given the broadest possible tools to shoot themselves in the foot.
Lua's ease of embedding into C++ code is a fool's paradise. Warcraft 3's JASS scripting language had way more structure and produced much better games, whilst being much simpler to work with than Lua.
All the academics describing metatables as 'powerful extensionality' and a fill-in for OOP are digging the hole deeper. Using tables to implement classes doesn't work easily outside school. Hiding a self:reference to a function inside of syntactic sugar is just insanity.
Nobody expects to write a triple-A game in lua, but they are happy to fob it off to kids learning to program. WoW made the right choice limiting it to UI extensions.
Fighting the language so you can try and understand a poorly documented game engine and implement gameplay features as the dev's intend for 'modders', is just beyond the pale. It's very difficult to figure out what the standard for extending functionality is, when everybody is making it up as they go along and you don't have a strongly-typed and structured language to make it obvious what the devs intended.
If you want to give your players a coding sandbox, make the scripting language yourself like JASS. It will be way better fit for purpose, way easier to limit for security and to guarantee reasonable performance. Your players get a sane environment to work in and you just might get the next DOTA.
Repeatedly shooting yourself in the foot on invisible syntax errors and an incredibly broad language is wasted suffering for kids that could be learning the programming concepts that cross all languages way quicker and with way more satisfying results.
Lua is hot garbage for it's most popular application, I really don't get it. Just stop!24 -
My worst habit(?) is probably loving to "waste" time, making api uri builders.
so I can chain a couple of methods instead of just typing out an uri :p -
Scala. The compiler is slow; sbt is buggy; too much syntactic sugar; implicits; cryptic; unreadable; and my biggest issue, symbols are reused and their use changes depending on how they are used, let's look at _:
As an existential type, as higher kind type parameter, as ignored variables, as ignored parameters, as ignored names of self types, as wildcard patterns, as wildcard imports, as hiding imports, for joining letters to punctuation, as assignment operators, as placeholder syntax, in partially applied functions, when converting call-by-name parameters to functions. -
It is amazes how much brain can be wasted with react.
In those 7hours (impressed myself by my bullshit withstanding), it took me 20min to understand a fucking api and how objects relate altogether, 1h to make the tut
and 5+fucking hours to understand how to plug the components.
I did use vue and backbone before and am 5y nodejs user.
seriously react is a bag of shitty magic.
I don't even want to try to read the code source yet, this could be the fatal move...
Oh. and also. people have to stop with jsx, it is so so so wrong. new syntax with new errors just for a fucking syntaxic sugar for saving a pair of parenthesis!!!!
like it matters after having installed 1e2+ MB of dependancies for a SPA of 10 components...
The only thing we miss is a react IDE to support JSX. #wheregoesthefront
And I am not even to the point of data flow and pubsub hells which i will be sure will be gold as well8 -
"Syntactic sugar is syntax within a programming language that is designed to make the language 'sweeter' for human. But...don't consume it too much!"
"Why?"
"You will be diabetic."
"Oh..."