24,939 reputation
535100
bio website
location
age
visits member for 4 years, 1 month
seen 12 mins ago

Author of C++ tutorials and Wide language.

Foo


45m
answered Creating a language for the virtual machine of another language: compile to that language or compile to the byte code?
1d
revised Developing a compiler for a self made CPU Architecture
added 278 characters in body
1d
revised Developing a compiler for a self made CPU Architecture
added 1067 characters in body
1d
comment Developing a compiler for a self made CPU Architecture
@Adil: C cannot be compiled to architectures that do not support pointers, at least 8-bit bytes, call stacks, and such, as those are fundamental language features.
1d
answered Developing a compiler for a self made CPU Architecture
1d
comment Correctly disposing objects upon server termination
@CengizCan: If you want to fix bugs, you need to refactor. That's how it works.
2d
comment Is the rule of 5 a valid extension of the rule of 3, or does it imply premature optimization?
That's not true. Those rules are centered around bad destructions, and unique_ptr guarantees safety. If you don't implement an operation, you just won't have it, it won't be broken. Also, even if you still need them in a few special cases, in the general case, they are obsolete. You should not be giving out advice that only applies to a tiny minority of niche cases without giant warning labels on it stating that it's terrible and unreliable in virtually every case that every reader will ever encounter. Especially when the questioner gives no indication that any such special case applies.
2d
comment Is the rule of 5 a valid extension of the rule of 3, or does it imply premature optimization?
The three, or five. Both of those rules are made obsolete by unique_ptr (five didn't even live long enough to become a real rule) and involve implementing copy and move operations for absolutely no benefit at all that just make the code less reliable and maintainable. I understand the rule of three just fine- it just only applies to C++03 and not C++11.
2d
comment Is the rule of 5 a valid extension of the rule of 3, or does it imply premature optimization?
@Jules: Except the Standard already provides one class that can handle every OS resource in that exact fashion- std::unique_ptr. Even if you wrap it in your own class, you can still just default the members instead of needing to implement them yourself.
2d
comment Is the rule of 5 a valid extension of the rule of 3, or does it imply premature optimization?
I downvoted you principally because your advice would entail implementing three to five redundant operations per class.
2d
revised Is the rule of 5 a valid extension of the rule of 3, or does it imply premature optimization?
added 115 characters in body
2d
revised Is the rule of 5 a valid extension of the rule of 3, or does it imply premature optimization?
added 622 characters in body
2d
answered Is the rule of 5 a valid extension of the rule of 3, or does it imply premature optimization?
2d
comment Why lambda/closures expressions came so late to C++?
@Giorgio: Then you're nuts. C++ posted the functional STL algorithms long before LINQ, or closures in C# or C++. Lambdas are nothing more than permitting those algorithms to be used in a vaguely sane fashion.
2d
revised Why lambda/closures expressions came so late to C++?
added 14 characters in body
2d
comment Why lambda/closures expressions came so late to C++?
Like I said, placement new is a different bucket of fish.
2d
answered Object creation: when should I expose a factory vs wrapping class?
Dec
25
comment NuGet Package Restore vs Keeping Everything in a VCS
Considering that the question is literally "What do you think", this is the poster child for too opinion based.
Dec
25
comment Is checking return values always required?
@QQ: Just declare it as noexcept. You don't need to add an empty try-catch.
Dec
25
comment Is checking return values always required?
@53777A: Those people are wrong and it's as simple as that. Unless you have some quite niche hardware restrictions.