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
-
fuckwit12166ySometimes I also like to tinker with c++ just to fuck it up completely. Requirements are simple:
It has to do something
It has to look strange/weird
Abuse the language
The output has to be unexpected while still being logical if you were to follow all the way through -
-
@irene I am currently working on adding a class "NamedTag" that can also be passed as constructor argument (it will be unpacked differently)
-
I think this is art. I've seen XML libraries implemented in a similar fashion and I think this is one of the most beautiful way to create generators.
-
But please don't use quotes to include headers. This makes it so cumbersome to port applications to other platforms since it is impossible to overwrite quotes in the include path. Rather include everything with <> and the set the include path correctly.
-
@gnulinuxer4fun I think your model is a lot cleaner than the PHP way.
As a feature, it should be good to be able to make functions able to generate HTML with your syntax. -
@redpanda101 for writing programs like this or for using this library?
if it's former: learn about templates
if it's latter: I'll most definitely write a doc once its out. wait 3-4 days maybe -
@gnulinuxer4fun also, i'm gonna contribute (github: redpanda101), but theres no comments
-
@redpanda101 you mean in the code?
That's because i barely ever comment code. imho Its a bad practice because it promotes lazy Ness
Before you contribute: wait until I've pusded my changes tomorrow morning -
mt3o19136y@gnulinuxer4fun right now you have some sort of a template. Have you wondered about next steps you want to take?
-
@Krokoklemme think of a situation like this:
if (state == 1) {
//dostuff
}
you could either add a comment
if (state == 1) { //idle mode
//dostuff
}
or you could make a new funciton
inline bool isIdle (int state) {
return state == 1;
}
if (isIdle (state)) {
//dostuff
}
this is the case for almost every situation where you'd need comments for -
@gnulinuxer4fun *almost* every situation, but not every
Commenting is a skill that requires discipline and commenting mundane things, of course, makes things harder to read. It's appropriate in situations where your intentions aren't immediately obvious
I tend to say: "use them sparingly, but don't avoid them", I get your point though
Also, your example would work even better if 'state' was an enum :P -
@Krokoklemme
hehe yea, that is my position as well. but "sparingly" means like... super super seldomly.
FUCK OFF I WON'T WRITE A STATE-OF-THE ART EXAMPLE FOR DEVRANT xDD -
ADD THIS ADD THIS ADD THIS
https://github.com/signalapp/...
Imagine the web but running on the signal protocol -
@Furyzer00 mhhh... maybe.... don't tell anybody though... especially not my teacher who forebade me them xDD
-
@ScaryException it was just to test wether umlaute work and that was the first word to come to my mind xDDD
Related Rants
-
FMashiro2Can't believe my suggestion is now part of the weekly rant history! Thanks guys!
-
cprn4I am amazed. I witnessed (mostly heard) a 14 year old girl calm down a young adult female suffering an anxiety...
-
HCC5GDKc73The most enthusiastic tutorial article about a simple class I've ever seen :D
OH dear!
I wanted to do webdev backend in C++.
It was cumbersome so I decided to write a library that helps me and OH MY GOD. I have COMPLETELY changed C++ xDD
https://github.com/Wittmaxi/webcpp
(yes, the screenshot is ACTUAL C++ xD)
rant
amazed
c++ is powerful