Page 3 of 3 FirstFirst 123
Results 21 to 28 of 28

Thread: Wayland Demonstration At XDS 2010

  1. #21
    Join Date
    Aug 2009
    Posts
    2,264

    Default

    May I ask why C++ would be such a disaster? It doesn't always mean slower...

    Not that I think C++ would be better suited than C in this case.

  2. #22
    Join Date
    Dec 2008
    Posts
    166

    Default

    Quote Originally Posted by V!NCENT View Post
    May I ask why C++ would be such a disaster? It doesn't always mean slower...

    Not that I think C++ would be better suited than C in this case.
    matter of choice: a C++ compiler/the C++ ABI/the C++ stdlib are just massive kludges. As I perceive it, they do not provide enough benefits for their cost in terms of software complexity and size (I was a C++ coder). Moreover, I noticed that C++ projects have the very naughty tendency to derive quickly towards brain fu**age. Well, we are talking C++ here, but it's the same with any languages with complex semantics (like full blown object orientation) included in their syntax. To give you the feeling: I can give a basic C compiler to write to a student and that would be reasonable, but to give a basic C++ compiler to write to a student would be perceived as sadistic. And let me remind you that it took decades for g++ to reach a reasonable support of the C++ standard.
    I repeat, it's a matter of choice of where you put the limits. And *I* do drive strongly towards simplification as much as it can (not simpler) of the software stack *as a whole*. An efficient kernel and an optimizing C compiler are already complex enough. If one day, we have a language which adds significant features while retaining the simplicity of the C language, let's start to write an efficient kernel. In the meantime, let's stick to C.

    But we move away from the wayland benefit subject compare to libdrm/gallium3d/libxkb. As far as I understand it, wayland benefit would only be the network protocol. Any thoughts?

  3. #23
    Join Date
    Aug 2008
    Location
    Finland
    Posts
    1,803

    Default

    Actually I recall the main reason to switch from C to C++ is that it reduces (or rather hides) a lot of the complexity. That very same full-blown object orientation is what supposedly makes it simpler.
    Note, simpler to write projects in, not to write a compiler for.

  4. #24
    Join Date
    Aug 2009
    Posts
    2,264

    Default

    C++ is better for larger projects, although headers could simply do the same in C, right?

    C would be much better for small projects and low level stuff like drivers and kernels.

    But why the hate for C++? I've seen it and I don't think it's realy based on anything but some nonsense experience.

  5. #25
    Join Date
    Dec 2008
    Posts
    166

    Default

    Quote Originally Posted by nanonyme View Post
    Actually I recall the main reason to switch from C to C++ is that it reduces (or rather hides) a lot of the complexity. That very same full-blown object orientation is what supposedly makes it simpler.
    Note, simpler to write projects in, not to write a compiler for.
    It is exactly the issue there. When you consider the software stack as a whole, you cannot neglect the complexity of the C++ compiler/C++ ABI/C++ stdlib. For much software the benefits of having object orientation directly hardwired in the syntax is not worth the added complexity. It is even worse: the object orientation syntax does not simplify the code, it pushes the coders to create massive object orientish kludge! It requires a very good code hygien... but that hygien would be requiered in *any* language, then better have hygien in a "less costly" language, like the father of all: C.

    Please! Stick to the wayland topic!

  6. #26
    Join Date
    Nov 2009
    Posts
    91

    Default

    Quote Originally Posted by sylware View Post
    Ok good.

    Now, what benefit a wayland backend will have compared to a libdrm/gallium3D/libxkb backend for GTK+/Clutter?
    From my pretty basic and possibly wrong understanding, Wayland still uses libdrm and Gallium3D but uses libxkbcommon rather than libxkb for keyboard input.

    The benifit is that you don't have to run an X server any more and have a much simpler and more lightweight display server.

  7. #27
    Join Date
    Oct 2008
    Posts
    3,242

    Default

    C++ is a very powerful language, which is a double edged sword. It's easy to do some very nice things, but it's also easy to complicate the code. It encourages some of the best and worst in coders, so you just have to be careful about what you allow and make sure all contributors follow the recommendations.

    Back to Wayland - at the very least, it would allow you to run on top of the proprietary drivers without forcing you to switch to the OSS Gallium3D drivers.

  8. #28
    Join Date
    Nov 2009
    Posts
    91

    Default

    Quote Originally Posted by smitty3268 View Post
    Back to Wayland - at the very least, it would allow you to run on top of the proprietary drivers without forcing you to switch to the OSS Gallium3D drivers.
    What is this in relation to? I thought Wayland wouldn't be able to run on the proprietary Nvidia drivers as Nvidia would have to provide kernel mode setting support, and they didn't have any plans to do so.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •