PASCAL for the win !!
Announcement
Collapse
No announcement yet.
April Fools' Or Should Wayland Switch Away From Using C?
Collapse
X
-
Interesting thread! It is puzzling that C was used for Wayland in the first place. Now this is coming from an old person but it strikes me as decision making by an old person that can't adapt to new tech. It is very much a 1980's dolution to systrm development.
Now adays C & COBOL programmers have a lot in common.
- Likes 1
Comment
-
Originally posted by wizard69 View PostInteresting thread! It is puzzling that C was used for Wayland in the first place. Now this is coming from an old person but it strikes me as decision making by an old person that can't adapt to new tech. It is very much a 1980's dolution to systrm development.
Now adays C & COBOL programmers have a lot in common.
- Likes 1
Comment
-
Originally posted by uid313 View PostHaskell is a good way to alienate developers. It is rarely used outside academia. Most programmers are not familiar with it.
Alas Haskell and Your claim of lack of commercial usage...
TIOBE rank it at the same bucket as Scheme or Groovy, quite popular languages in commercial development.
PYPLY would give it 20th place, in line with Rust or Go, both also quite popular in commercial development.
Red Monk would put Haskell in most popular quadran on github.
Ergo, Haskell is in use in software that's not necessary facing wide audience.
(heck even Facebook spam filter... is unknow to anyone apart from facebook devs, but hey it's haskell!
- Likes 1
Comment
-
This is great. It brings out all the people who don't have a clue of what they're talking about.
Wayland is a protocol. It's written in XML.
The Wayland XML can be used to generate bindings in any number of languages, including libwayland-client, which is generated C code. Generating bindings for Haskell or Rust is just as easy.
The Wayland XML is also used to generate some server code for a display server written to use the Wayland protocol, like libwayland-server. There are a number of Wayland display servers written using C, such as Weston (a non-production reference display server) and Mutter (the display server invented here by the Gnome people). There's C++ bindings invented here for Kwin by the KDE people. Nothing's to stop anyone from inventing here their own display server written in Haskell or Rust, and the beauty of a protocol like Wayland is you can intermix them all: a Rust client binding will talk to a C/glib Mutter just as readily as a KDE client will talk to a fanciful display server written in Rust. Go forth and do it people.
So, really, the question raised in the feature article is non-nonsensical. Wayland already doesn't use C, so it can't switch away.
- Likes 10
Comment
-
Originally posted by cipri View PostThe c example of wayland clients/servers could look in c++ easier to follow with less code, better structured....
There is a good reason why you barely find applications based on wayland directly! Gnome and KDE are working since years on wayland support and it's still not ready.
Originally posted by cipri View PostIf lib-wayland would be done with c++14 and being well designed, writing wayland clients would be a triviality! It would be easier than using QT [since QT has old style c++ api].
Originally posted by cipri View Postcipri
- Likes 3
Comment
-
Originally posted by bregma View PostWayland already doesn't use C, so it can't switch away.
The other option would be to write everything myself starting from just the protocol. All this just because I want a f.... window on the screen without having to rely on the bad framework of others [bad license or even code - ancient api which forces bad (internal) design]!!
cipriLast edited by cipri; 02 April 2017, 12:14 PM.
- Likes 2
Comment
-
Originally posted by cipri View Post
The talk is not about the wayland protocol! The problem is that if you want to write a wayland client [without writing your own server] you have to use lib-wayland which is written in c. The problem is, you have to choose between: using a c-library with all the pitfalls , or use kde/gnome.... which might not be your choice because of their license and their dependencies (i.e. QT])! This is the reason why I cannot use kde/gnome. So the only choices I have left is writing my own framework... based on the c-library lib-wayland which is forcing me to introduce ugly "time-bombs" (i.e. reinterpret_cast) in the code.
The other option would be to write everything myself starting from just the protocol. All this just because I want a f.... window on the screen without having to rely on the bad framework of others [bad license or even code - ancient api which forces bad (internal) design]!!
cipriLast edited by timtas; 02 April 2017, 01:02 PM.
- Likes 2
Comment
-
Originally posted by cipri View Post
The talk is not about the wayland protocol! The problem is that if you want to write a wayland client [without writing your own server] you have to use lib-wayland which is written in c. The problem is, you have to choose between: using a c-library with all the pitfalls , or use kde/gnome.... which might not be your choice because of their license and their dependencies (i.e. QT])! This is the reason why I cannot use kde/gnome. So the only choices I have left is writing my own framework... based on the c-library lib-wayland which is forcing me to introduce ugly "time-bombs" (i.e. reinterpret_cast) in the code.
The other option would be to write everything myself starting from just the protocol. All this just because I want a f.... window on the screen without having to rely on the bad framework of others [bad license or even code - ancient api which forces bad (internal) design]!!
Wayland is language-neutral. Language agnostic. It is not written in C. You do not have to use C. The C bindings have been provided for you for free. Some others are working on other language bindings (the subject of the article) for you for free. That's great. You get a lot of choice for free. If you're not getting exactly what you want, maybe you should demand all your money back. If you choose to avoid using the work of others for whatever reasons, you need to accept that you will need to replace their work with your own effort, and there will be a cost and any complain about your choice is only a complaint about your choice.
Wayland is a wire protocol. A mutually-agreed-upon way of encoding information packages sent between independent processes. You do not have to write your own server to write a client. You do not have to write your own server to generate language bindings for a client. Client and server are independent, decoupled through the use of a wire protocol defined using an implementation-neutral language called XML. That's the whole point of having a wire protocol defined separately from an implementation.
- Likes 7
Comment
Comment