3 ms·
I'm definitely upvoting this, as i think this is very much the right direction (I'm actually working on something similar). After reading into it, I think for
by Micoloth 9y ago
I'm definitely upvoting this, as i think this is very much the right direction (I'm actually working on something similar).
After reading into it, I think for me personally it really isn't enough though.. These are some of the reasons why I'll never use it :
1. using := instead of = is straigh up worse. No way i'd use 2 characters instead of 1 for an operator that common.
2.i don't think the eventuality of bugs really justifies the repetition of public and private at EVERY SINGLE variable, that's a lot of repetitions
3. If I have to learn a new syntax, it really has to make my life easier: this Definitely includes automatic generation of all needed include statements (or import, whatever). I know there is some work to do to make it happen, but we definitely are able to do it in 2017. No way imports are something we should be doing by hand anymore
4. (also a lot of other minor things that don't add meaning, like (int argc, char argv) that really shouldn't be there)
Of course I hope it's clear that this is my very personal point of view :)
- MaulingMonkey 9y ago> I'm definitely upvoting this, as i think this is very much the right direction (I'm actually working on something similar). C++'s boilerplate is maybe 10th on my list of major beefs with the language, so to me it seems to have the wrong priorities. Still interesting to see a take on it though. > 1. using := instead of = is straigh up worse. No way i'd use 2 characters instead of 1 for an operator that common. Less typoing "==" as "=" and your code still compiling though, and it's ":=" instead of "auto ... =" - so 4 fewer characters. > 2.i don't think the eventuality of bugs really justifies the repetition of public and private at EVERY SINGLE variable, that's a lot of repetitions C# got me used to that!
- jhasse 9y ago> 1. using := instead of = is straigh up worse. No way i'd use 2 characters instead of 1 for an operator that common. Maybe you have mistaken := as the assign operator? It rather is for local variable declaration: foo := xy becomes auto foo = xy; so it's 2 characters instead of 7 :) > 2.i don't think the eventuality of bugs really justifies the repetition of public and private at EVERY SINGLE variable, that's a lot of repetitions Good point. My thinking was that Java/C# seem to be fine with that decision. Also the : after public/protected/private clashes with Coffee++'s Python-like scopes. > 4. (also a lot of other minor things that don't add meaning, like (int argc, char argv) that really shouldn't be there) The reason for keeping stuff like (int argc, char argv) is that I want this to be used in C++ projects in the sense that you could have some Coffee++ files and some C++ files together with the only difference, that your build system translates the Coffee++ files to C++ before compiling. But I'm open to replacing other annoyances of C++. Maybe int main(std::vector<std::string> foo): could be translated into int main(int argc, char** argv) { std::vector<std::string> foo; for (int i = 0; i < argc; ++i) { foo.emplace_back(argv[i]); } ;)