Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

C20 & C++20 or Lisp/Scheme/Haskell

Name: Anonymous 2017-07-29 4:06

Name: Anonymous 2017-07-29 8:31

>>1
Thousands of "Lisp/Haskell is a superior language" threads struck a nerve.
Sepples in fifty years will absorb whatever "lisp/haskell" offers,
in form of fifty megabyte compilers and bloated libraries.
And since C++ is the speed king, Lisp/Haskell programmer will have incentive to switch.
In twenty years, C itself will get lite-version of the above or extend preprocessor(like _Generic made C work with function overloading and type-checking).
some like _Constexpr (essentially _Eval) on preprocessor will likely come soon.

Name: Anonymous 2017-07-29 9:00

the Herb Sutter paper is about emulating Qt not Lisp.

Name: Anonymous 2017-07-29 9:41

Sepplestards seriously never fucking learn. After two decades you'd think they noticed that gluing more features onto the language doesn't improve it. I dare you to find a set of major Sepples features which don't horribly clash with each other in some way.

Name: Anonymous 2017-07-29 16:36

>>3
You didn't read it properly, he's talking about hygienic macros, although he doesn't use the term. All of those things used to emulate Qt were done by being able to add new user-defined abstractions and syntax.

Name: Anonymous 2017-07-29 17:37

>>4
reflection & coroutines

Name: Anonymous 2017-07-29 23:57

It's called the Hegelian dialectic. See Lisp, Java, and the Hegelian dialectic.

https://dis.tinychan.org/read/prog/1480298300

Name: Anonymous 2017-07-30 4:08

What is the point of constexpr anyway? Any self-respecting compiler could easily deduce if a function is pure or not without it.

Template metaprogramming is stupid as well, C macros are already almost perfect (almost because you can't use #define inside defines).

Name: Anonymous 2017-07-30 4:38

>>6
Since when does Sepples have reflection?

Name: Anonymous 2017-07-30 4:47

>>9
Since last year, but won't be standardized until C++20.

https://www.gnu.org/software/gcc/projects/cxx-reflection/

Name: Anonymous 2017-07-30 4:49

>>8
constexpr is so you can let the compiler know that you want it to be pure and expect it to be pure, or you get a compiler error upon assigning to a constexpr variable.

Name: Anonymous 2017-07-30 7:09

>>8
constexpr allows you to write compile-time code, debugged and scoped to single functions.
Macros expand without any typechecking and without any scope(once defined they exist until #undef),
Macros don't care if a parameter is a variable, block of code or some mess of punctuation, for preprocessor its all strings and compiler has to deal with the final output.

Name: Anonymous 2017-08-12 5:07

The C and C++ standards committees are different because they have no honor. There used to be more ISO language committees and standardization was not determined by the number of users of the language. ISO created standards for the users and implementers of the language, not so managers could have a ``standard language''. This is a corruption of what language standards are for and an enormous lie by C hackers. When C was standardized, the C committee saw it as a competition and didn't want there to be other ``standard'' programming languages. They said that C was ``the standard'' and were against standardization of more languages except for C++.

http://www.unix.org/whitepapers/wp-0897.html
This is also what the UNIX hackers have done. Note the emphasis on ``open'' and ``standard''. They did not want to create a standard for UNIX-like operating systems. They wanted UNIX to be ``the standard'' operating system. They want C to be the ``standards-based'' language.

How will Java and the Network Computer terminal manifest themselves? The exact answer is unknown; however, in open computing, the process for finding that answer is well understood. The UNIX system community has set aside (via consensus standards) the wasteful task of developing arbitrary differences among computing environments. Rather than building proprietary traps, this community is actively seeking ways to add value to the UNIX system with improved scalability, reliability, price/performance, and customer service.
They consider multiple operating systems and programming languages to be ``the wasteful task of developing arbitrary differences among computing environments''. If it's not C, C++, and sometimes Java, they don't want you using it.

Name: Anonymous 2017-08-13 17:40

open-std

STD is right.

Algebraic effects in C dot PDF

Literally all control flow comes down to GOTO. If you want call/cc you can implement it yourself, savages.

Name: Anonymous 2017-08-14 7:01

I for one, am looking forward to reflection and metaclasses in C++.

However, I do not like how the properties of a metaclass are changed inside a constexpr block. Of course it is being evaluated at compile time, but the expressions may not be constant expressions at the time of evaluation. They could've just used a new keyword like metaexpr or genexpr or haxpr or hygienic or hyenas, but instead they chose to use constexpr and call non const functions inside it. Maybe constexpr has different semantics inside a metaclass.

The definition of compiler may cause namespace collisions. It should be encapsulated in a namespace, which may either be introduced by inclusion of a header file or made available inside metaclass definitions. P0194 proposes a reflect library, and compiler could be made part of it.

P0194, P0590, P0598 define a reflexpr operator, but they is defined to have different behavior by each document. In P0194 and P0590, reflexpr yields types. In P0590, $ yields values. In P0598 reflexpr yields values. Introducing $ to the source character set is a bad bad idea, not all keyboards have the $ character. I think that the suggestions proposed by P0598 are good for working with a metaclass, but it has to yield a non const value to work with them. And this is again in conflict with the existing constexpr requirements.


#include <reflect> // to access the compiler.function

metaclass interface {
metaexpr {
auto x = reflexpr(interface);

reflect::compiler.require(x.member_variables.empty(), "interfaces may not contain data.");

for (auto &&f : x.member_functions) {
reflect::compiler.require(!f.is_copy() && !f.is_move(), "interfaces may not copy or move; consider a virtual clone() instead");

if (!f.has_access())
f.make_public();

reflect::compiler.require(f.is_public(), "interface functions must be public.");

f.make_pure_virtual();
}
}

virtual ~interface() noexcept {}
};

interface Shape {
int area() const;
void scale_by(double factor);
};

class Sepples : Shape {
static constexpr auto meta_sepples = reflexpr(Shape);

int area() const;
void scale_by(double factor);
};


http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0590r0.pdf
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0598r0.html
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0194r4.html

Don't change these.
Name: Email:
Entire Thread Thread List