Talula
If you think C++ could be changed so much then they would never come up with C#
Ludovic 'Archivist'
If you think C++ could be changed so much then they would never come up with C#
They would because C# is pretty much entirely something else, it is a portable cross-platform language that requires a runtime to compile its intermediate form
Talula
They would because C# is pretty much entirely something else, it is a portable cross-platform language that requires a runtime to compile its intermediate form
VB 1990 and VB today is a totally different thing, but it's still called "VB"... not with C++ the name wasn't kept, C++ still exists... thus it didn't change that much.
Talula
If you want to claim it's a "Functional" language, well it's not, if you claim you use it like a functional language... maybe I don't know.
Talula
It was invented to add OOP to C.
Pavel
It's discussion about nothing, isn't it? Who cares how something is named (it doesn't change the idea).
Ludovic 'Archivist'
Ludovic 'Archivist'
I posted the link to it's history... what you said never happened.
It is a very "brief" summary of C++ history
Ludovic 'Archivist'
Just like saying "ww2 is Germans killing a bunch of people"
Talula
Just like saying "ww2 is Germans killing a bunch of people"
One single company and one team leader invented it... it wasn't invented overtime.
Ludovic 'Archivist'
Also, C++ is not the name of a language
Ludovic 'Archivist'
It is the name of a family of languages
Ludovic 'Archivist'
With incremental changes to it
Talula
With incremental changes to it
This new language was developed by Bjarne Stroustrup and was called C++.
Ludovic 'Archivist'
Ludovic 'Archivist'
This is a bit more detailed
Pavel
Do you understand that you started from usage, then jump from that to idealogy (actually interpretations), then to history and naming, which has no relation with the original topic?
Talula
In 1985, Stroustrup's reference to the language entitled The C++ Programming Language was published
Talula
Same... no change...
Talula
In 1985, Stroustrup's reference to the language entitled The C++ Programming Language was published. That same year, C++ was implemented as a commercial product.
Talula
Also, C++ is not the name of a language
But claiming it wasn't called "C++" is wrong... it was always called C++
Ludovic 'Archivist'
Talula
There were no incremnetal changes till the language was published... yes after pulishing there were changes.
Talula
It was called C with classes from 1979 through 1983
Published "i.e. released to public".
Ludovic 'Archivist'
Published "i.e. released to public".
In 1983, the name of the language was changed from C with Classes to C++.
Talula
In 1983, the name of the language was changed from C with Classes to C++.
If it was publised in 1985, I don't care what they did internally...
Ludovic 'Archivist'
Published "i.e. released to public".
It was already used internally at AT&T before
Ludovic 'Archivist'
If it was publised in 1985, I don't care what they did internally...
Yes, but it was already more than what existed before
Ludovic 'Archivist'
Not to mention that those iterations would no longer compile on any compiler nowadays
Talula
It was already used internally at AT&T before
Overall it's not a functional language, the idea was to make an OOP langauge out of C and there are specialized functional language as old as fortan.
Ludovic 'Archivist'
And not to mentions the other non backward compatible C++ 2.0
Talula
Nothing from that time will compile on today's compiler...
Ludovic 'Archivist'
Monads in C++ are a thing whenever you use them or prefer to use design patterns
Ludovic 'Archivist'
Prove it.
auto maybe_fd = [] (int i) -> std::optional<int> { return i!=0?i:nullopt;} ;
Talula
algebraic data types & pattern matching?
Talula
partial function applications (requires implicit closures in general)?
Talula
Type inference (despite what people call "type inference" in C++ land it's a far shot from what you get with Hindley/Milner a la ML or Haskell)?
Talula
Tail calls (some compilers can optimise some limited cases of tail self-recursion, but there is no guarantee, and the language is actively hostile to the general case (pointers to the stack, destructors, and all that))?
Talula
Garbage collection (you can use Boehm's conservative collector, but it's no real substitute and rather unlikely to coexist peacefully with third-party code)?
Ludovic 'Archivist'
partial function applications (requires implicit closures in general)?
You have implicit closures in C++ with type erasure, as well as algebraic datatypes using templates
Talula
And when was that added?
Ludovic 'Archivist'
And when was that added?
Templates always were algebraic datatypes
Talula
Pattern matching... does not exist in C++
Ludovic 'Archivist'
However they are more verbose to use than in Haskell
Ludovic 'Archivist'
It however is more limited than in most languages
Ludovic 'Archivist'
It is planned to be added more formally in next versions
Talula
Ludovic 'Archivist'
Most do
Talula
Lisp, Haskel, Erlang.
Ludovic 'Archivist'
Lisp, Haskel, Erlang.
They are never a requirement but an implementation method
Ludovic 'Archivist'
Nothing forbids a standard c++ library to be garbage collected
Anonymous
😶 can anyone show me how we can find a digit in a Number in CPP Like to check if 3 is present or not in 46748327 this number
Ludovic 'Archivist'
Talula
Nothing forbids a standard c++ library to be garbage collected
There is not a single implimentation of C++ that has garbage collector...
Talula
0
Talula
Also, Lisp is also OOP
The Common Lisp Object System (CLOS) is the facility for object-oriented programming which is part of ANSI Common Lisp. CLOS is a powerful dynamic object system which differs radically from the OOP facilities found in more static languages such as C++ or Java.
Anonymous
You will have to at least partially stringify the number
So I'll have to take input as int then show parse it as string and compare the number i wanna find to each character of that string?? No any way for directly compare by int?
Ludovic 'Archivist'
😶 can anyone show me how we can find a digit in a Number in CPP Like to check if 3 is present or not in 46748327 this number
The code here may help you in writing the algorithm you need by yourself: https://github.com/clinlfoundation/FEL/blob/master/include/FEL/range/display_ranges.hpp
Ludovic 'Archivist'
And you do not need to store the actual string
Anonymous
You can return as soon as you find 3 while stringifying
There can be more than 1 no of 3's
Talula
wrong
Wrong
Ludovic 'Archivist'
+10, I never code OO in C++ if I can avoid it
I personally only do it to implement type erasure monads
Parra
Parra
at least Ludovic understands my point
Parra
and I respect his opinion