[ / / / / / / / / / / / / / ] [ dir / random / 93 / biohzrd / hkacade / hkpnd / tct / utd / uy / yebalnia ]

/prog/ - Programming

Programming

Name
Email
Subject
REC
STOP
Comment *
File
Password (Randomized for file and post deletion; you may also set your own.)
Archive
* = required field[▶Show post options & limits]
Confused? See the FAQ.
Options

Allowed file types:jpg, jpeg, gif, png, webp,webm, mp4, mov
Max filesize is16 MB.
Max image dimensions are15000 x15000.
You may upload5 per post.


File: 1447702914061.jpg (19.88 KB,329x213,329:213,falsiness.jpg)

c3b352 No.3589

What is something you hate about programming in general?

In other words, what programming features do you hate most that nearly every language incorporates?

Personally, I fucking loathe falsiness.

I hate it when any language inherently treats 0 as false, or empty strings, or empty lists, or NaN floating point values. It's excusable in C, and in C++ for C compatibility, but any language with a dynamic type system has no excuse.

The only things that should evaluate false are an actual boolean false value, or a null pointer (ie. pointer type with a null value, where type is significant, as integer 0 should still evaluate true).

____________________________
Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

c3b352 No.3590

>>3589

Oh, same. That drives me bonkers.

I like scheme's approach to that, in that literally the only false value is #f. It's helpful that 0 is not false when dealing with array/list indices. I can do things like this:

(and-let* ((index (search-vector-blah-blah-blah vect something)))
;; and this code will still run if index is 0, but not if index is #f (false)
(do-something-with-index vect index))

I hate whatever Javascript does with strings and numbers and them being freely convertible between the two types.

I don't know where I stand on Javascript. It brought some pretty solid features to the mainstream, but then it's got lots of weird warts to work around.

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

c3b352 No.3705

Why is it excusable in C?

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

c3b352 No.3711

Hate dynamic typing and languages without sum types. It's pathetic. No Option/Maybe time in the standard library? Into the garbage.

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

c3b352 No.3712

I don't hate any features of any language. That's pointless. Just pick a language you like, and do your shit. That feature you "hate" is probably irrelevant to the big picture.

I do however "hate" the whole programming culture. They are all so arrogant, but the effects just aren't there. How many people work on software that you use every day? And it's all shit. Web browsers have been around for decades, and they are all shit. And of course they hate it when people criticize their software, or make them jump through hoops before they can do so. What, are you such a special snowflake that you get to insult people because they dared to suggest a feature, or report a bug "wrong" ? Fuck you then. Programming needs more humanity.

What else do I "hate"? The people act like you have to spend years doing banal shit before you can actually get stuff done. You don't need their special language to start programming. You don't need advanced math. You don't need to know what "github" is. You just need to get in and do stuff.

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

c3b352 No.3715

>>3705

Because C is a step above portable assembler, so a conditional there is often little more than an abstraction of a test against zero anyway.

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

c3b352 No.3722

>>3589

>fucking hate falsiness

>null should be falsy

I hate gets() and scanf(). In CURRENT_YEAR, these libc functions should do nothing but cause a compile-time error, telling you to use shit that isn't fundamentally insecure (in the case of gets) or fundamentally incapable of interacting reasonably with a user (in the case of scanf). Read in lines at a time, into buffers that can contain those lines, and use sscanf() on read lines if you really want that shit.

I hate how every 'modern' 'advanced' 'high-level' programming language is stuck in the 90s. The Linux kernel continues to advance. It has all kinds of cool system calls. You can do shit like swap the names of two files without a race condition. But fuck it, Windows doesn't have that, and it wasn't portable among unices back in 1995.

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

c3b352 No.3723

oops that second one wasn't a future.

Replacement hate: laziness.

It is the solution for literally nothing, but it introduces all kinds of problems of its own.

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

c3b352 No.3726

>>3722

Null being falsy is unambiguous in almost every case.

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

c3b352 No.3728

>waah waah languages arent 100% theoretically correct

Fucking pretentious losers in this thread, what have you accomplished besides bitching?

https://en.wikipedia.org/wiki/Parkinson%27s_law_of_triviality

Go and write something more complex than "hello world" to have some weight behind your words before you act like a software god. Your code probably runs like shit, and that's not because gets() and scanf() suck, >>3722

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

c3b352 No.3737

>>3728

I'm a professional programmer who has to use dozens of languages through work; you get a long list of things to hate when you have to use tons of different languages in codebases written by other people.

Why are you afraid that people might actually learn something and improve?

You can't really invoke Parkinson's Law of Triviality here, given that what we're talking about are basic programming features that affect every aspect of the language. That's the opposite of the Law of Triviality.

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.



[Return][Go to top][Catalog][Nerve Center][Random][Post a Reply]
Delete Post [ ]
[]
[ / / / / / / / / / / / / / ] [ dir / random / 93 / biohzrd / hkacade / hkpnd / tct / utd / uy / yebalnia ]