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

What would you change in C?

Name: Anonymous 2009-08-26 13:44

It's the time for the next revision of the C standard and for some reason they want your advice. What do you add, remove, rename, etc ?

Name: Anonymous 2009-08-27 4:45

>>29
good point, i didn't think of that.
i just said ** because that's what they use in perl

Name: Anonymous 2009-08-27 6:18

>>38-39
Bawww low-level languages aren't high-level ones.

Name: Anonymous 2009-08-27 8:36

Make <frozen.h> a part of the standard of the standard library (includes common headers, etc..)

Name: =+=*=F=R=O=Z=E=N==V=O=I=D=*=+= !fRoZeNHN4I 2009-08-27 12:28

I personally use Notepad2 and avoid any "makefiles"(which i consider bloated and poor design)[1]

I use one include file for everything.
#include "void.h" //handles all the common functions,#defines,#ifdefs and #includes[2]

Anything which uses makefiles is defective Sepples-level shit.
All the C code posts on my blog are void.h merged with somefile.c

-
References:
1. http://dis.4chan.org/read/prog/1250330533/ >>10
2. http://dis.4chan.org/read/prog/1250330533/ >>12

_____________________________________
http://bayimg.com/image/aadbjaace.jpg
Velox Et Astrum gamedev forum: http://etastrum.phpbb3now.com
My Blog: http://frozenvoid.blogspot.com/
The primitive mentality is a condition of the human mind, and not a stage in its historical development.

Name: Anonymous 2009-08-27 15:08

>>42
Um, excuse me >>42-san, but C is a high-level language desu yo~~

Name: Anonymous 2009-08-27 15:16

>>45 YHBT

Name: Anonymous 2009-08-27 16:08

Hax my anubis.

Name: Anonymous 2009-08-27 16:10

>>44
Where have you been , anus?

Name: =+=*=F=R=O=Z=E=N==V=O=I=D=*=+= !fRoZeNHN4I 2009-08-27 16:21

>>48
writing a infinite compression algorithm in C

_____________________________________
http://bayimg.com/image/aadbjaace.jpg
Velox Et Astrum gamedev forum: http://etastrum.phpbb3now.com
My Blog: http://frozenvoid.blogspot.com/
« our array warning sensors can help us, for the mind worms infiltrate through every crevice and chew through anything softer than plasma-steel. »

Name: Anonymous 2009-08-27 16:37

>>49
Well get back to work and don't post on /prog/ again until you're finished. Focus!

Name: Anonymous 2009-08-28 2:54

C ought to have (optional) structural type equivalence, whole program type inference, bound-checked array types, and syntax based on Pascal.

Name: Anonymous 2009-08-28 3:25

>>51
FUCK PASCAL SYNTAX. The only thing worse is BASIC syntax... "If x Then Nothing() End If" is such an eye sore.

Name: Anonymous 2009-08-28 3:28

>>52
Okay, how about Ruby syntax then

Pickle surprise!

Name: Anonymous 2009-08-28 3:31

>>51
i think bound checked arrays would conflict with malloc() and such.

Name: Anonymous 2009-08-28 12:44

I would make bumping part of the C standard

Name: Anonymous 2009-08-28 13:57

>>54
No. When allocating a bound-checked array, you pass malloc() the size of the actual data, plus the size of a pointer to the last element. Or just the length of the data, I suppose, if you can manage a type system that handles it well enough. That way, it's one contiguous block of memory that you can free() whenever needed.

There should still be "raw" arrays so programmers can shoot their toes off, but there should also be a typesafe foreach loop of some sort to give them the opportunity not to pump their shoes full of lead.

Name: Anonymous 2009-08-28 14:32

>>52
Yes, everyone can agree that BASIC is terrible, but you don't like Pascal's syntax? Seriously?

Name: Anonymous 2009-08-28 14:56

>>57
He's not the only one

Name: Anonymous 2009-08-28 17:09

>>58
Why is Pascal not your favourite programming language?

Name: Anonymous 2009-08-28 19:05

I'd add objects and add several new methods to the standard library.

Name: Anonymous 2009-08-28 19:40

>>26
No that's ASM

Name: Anonymous 2009-08-28 19:52

>>59
Pascal has AIDSful semantics. It adheres too closely to the philosophy of structured programming, which is basically a misguided attempt to implement an FP-style data flow in an imperative context.

Name: Anonymous 2009-08-28 20:22

>>62
IHBT

Name: Anonymous 2009-08-28 20:45

>>63
Actually, >>62-chan makes an eerie sort of sense. Structured programming restricts you to one straightforward control flow through any given procedure, including one return statement. It's basically an elaboration on "GOTO considered harmful"

Name: BWK Wilson Kernighan 2009-08-28 20:47

>>62
It seems you missed the reference.

Name: Anonymous 2009-08-28 20:50

Structured programming considered harmful and ultimately destructive.

    '-._                  ___.....___
        `.__           ,-'        ,-.`-,            HAVE YOU READ
            `''-------'          ( p )  `._       YOUR TURBO PASCAL TODAY ?
                                  `-'      (
                                            \
                                  .         \
                                   \---..,--,
       ................._           --...--,
                         `-.._         _.-'
                              `'-----''

Name: Anonymous 2009-08-28 22:09

Uhh, personally, I'd just make D compilers better, instead.

Barring that, namespaces.

Name: Anonymous 2009-08-29 0:13

>>67
D is OOP shitsteak. I for one want nothing to do with it.

Is there ANYONE still designing languages that don't jump on the OOP bandwagon?

Name: Anonymous 2009-08-29 0:18

>>68
Your options (with modern compilers) are C, Haskell, Erlang, Scheme.....

....Uhm, assembly?

So basically, no.

Name: Anonymous 2009-08-29 0:44

>>68-69

OOP in its purest form is just one way to abstract. It may work for some types of programs (window managers, games, large frameworks,...), but for others it may be unneeded. OOP is good when it's not forced and suits the problem domain, but at the same time you can use it or implement it without the language having support for it. You can write in an OOP manner in C, by just designing data structures and making functions which operate on them. Add some tagging/inheritance mechanism using the structures fields and you have OOP. On more capable languages like Lisp-based languages, it's possible to implement OOP in the language itself, even though CL has CLOS in the standard, but actually implementing a simple message passing interface can be done in a page or two of code. I think that CLOS' way of not forcing methods to be connected with data structures gives you what's best of OOP: extensibility, without actually having to forcibly link that method to some data structure. That way generic operators can be designed which work with all kinds of objects. The most common example of such an operator would be generic arithmethic operations:
(+ fixnum fixnum)
(+ fixnum integer)
(+ bignum bignum)
(+ bignum integer ... bignum) and so on, the actual result's type depends on the input's actual data.

What I'm getting at is that OOP is not bad by itself, and it should be used where it provides some advantage, but it should never be forced or unnecessarily restricted by other concepts. If you keep OOP as just a generic way to extend functions and keep structures with (single or multiple) inheritance of fields/slots separate, then it's fine.

What's called OOP in these days, C++, Java, is nothing more than a forced combination between the concept of method and structures with inheritance, which by itself is a common usage of OOP, but as a general concept it's bad and just leads to people inventing patterns to work around this forced limitation.

Name: Anonymous 2009-08-29 1:13

>>69
Lisp, Factor, APL....

Name: Anonymous 2009-08-29 1:52

>>68
Lua did OOP right in my opinion, by implementing inheritance as a simple assignment of metatables containing methods and data. This is a vast improvement over strict OOP because it can flex when you need it to without complicated polymorphism or more obscure methods of using OOP to solve problems that are almost, but not quite, perfectly suited to OOP. When the problem fits well in the domain, great; when it doesn't, that's fine, too.

Name: Anonymous 2009-08-29 2:14

>>72
OOP design is fucking easy when you use UML. I have absolutely no problem using Java or C++ when I write my code because I code it to my system design. It sounds like you write code without any formal system design. Hacking non-trivial systems in this manner is a waste of time and gives you problems just as you describe.

Name: Anonymous 2009-08-29 2:22

>>73
fuck, I'm supposed to draw a bunch of diagrams every time I write a program?  Fuck OOP.

Name: Anonymous 2009-08-29 2:28

>>73
Protip: not everything is a fucking object.

Name: Anonymous 2009-08-29 2:36

>>73
UML
IHBT

Name: Anonymous 2009-08-29 2:57

>>74
Exactly. Draw a bunch of boxes, write some labels in them, and then complete with arrows. It is fucking easy and removes any doubt about the class logic.

>>75
That's right.

Name: Anonymous 2009-08-29 4:29

i, for one, enjoy UML.

Name: Anonymous 2009-08-29 4:35

UML leverages core skillsets and world-class diagrams to provide clients worldwide with robust, scalable, modern turnkey implementations of flexible, personalized, cutting-edge Internet-enabled e-business application product suite e-solution architectures that accelerate response to customer and real-world market demands and reliably adapt to evolving technology needs, seamlessly and efficiently integrating and synchronizing with their existing legacy infrastructure, enhancing the e-readiness capabilities of their e-commerce production environments across the enterprise while giving them a critical competitive advantage and taking them to the next level.

Name: Anonymous 2009-08-29 5:48

More precisely and usefully defined semantics for "volatile", memory barriers, multithreading and similar things a modern systems programming language needs.

Rules for the more arcane shit in the language rewritten so they're understandable by normal people.

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