Programming thread

Microsoft's new programming language is looking pretty good so far:
 
This looks a lot like what I want, and thanks for saving me tens of man hours. But to a more open ended question everyone's calling me a degenerate for trying to create an interface that does attr_writer for n instance variables at a time rather than just one, which seems like a logical jump to me. Clearly I'm missing a fundamental piece of theory and if anyone can tell me what that is, or better yet name/linkdrop a book on theory or a rant from some 80s revolutionary on The Right Way that'd be appreciated. Now that I know how to catch a fish, it's probably important to figure out why everyone says the fish I'm seeking are all diseased and radioactive.
I only program as a hobby so I don't know the right book to drop.

But you're screwing up encapsulation bad here. You're mad about how verbose OOP programming can be and that's okay. It is. When you're doing OOP you need to program defensively like you're protecting your code from being used incorrectly by the next Pajeet programmer that comes along, because you'll forget what the hell you did in six months and then you'll be about at the same skill level as a Pajeet programmer trying to understand your own code.

For example, what happens if somebody fatfingers an entry into the class's attribute table while updating multiple attributes? You'd need to catch that, and then also you'd need to catch if someone entered an invalid value. For every possible K-V combination. Good luck. One point of entry, one point of exit, do one thing, this is the OOP way.
 
I only program as a hobby so I don't know the right book to drop.

But you're screwing up encapsulation bad here. You're mad about how verbose OOP programming can be and that's okay. It is. When you're doing OOP you need to program defensively like you're protecting your code from being used incorrectly by the next Pajeet programmer that comes along, because you'll forget what the hell you did in six months and then you'll be about at the same skill level as a Pajeet programmer trying to understand your own code.

For example, what happens if somebody fatfingers an entry into the class's attribute table while updating multiple attributes? You'd need to catch that, and then also you'd need to catch if someone entered an invalid value. For every possible K-V combination. Good luck. One point of entry, one point of exit, do one thing, this is the OOP way.
Sanitizing input through structured exception handling in a method is not The Right Way?
 
Microsoft's new programming language is looking pretty good so far:
What was here? It's gone now. archive.md doesn't have a copy and Google's cache just shows a pretty bare repo which I presume to be what all MS projects would fork off of. Is that all there was?

Is this L programming language a new thing? Was this a leak?
 
What was here? It's gone now. archive.md doesn't have a copy and Google's cache just shows a pretty bare repo which I presume to be what all MS projects would fork off of. Is that all there was?

Is this L programming language a new thing? Was this a leak?
Nobody really knows but I got an archive of the issues page.

There was absolutely nothing on the main repo page. It was completely empty (sans stock git init files) except for a comment that said "The L Programming Language". That google cache page is accurate.
 
This looks a lot like what I want, and thanks for saving me tens of man hours. But to a more open ended question everyone's calling me a degenerate for trying to create an interface that does attr_writer for n instance variables at a time rather than just one, which seems like a logical jump to me. Clearly I'm missing a fundamental piece of theory and if anyone can tell me what that is, or better yet name/linkdrop a book on theory or a rant from some 80s revolutionary on The Right Way that'd be appreciated. Now that I know how to catch a fish, it's probably important to figure out why everyone says the fish I'm seeking are all diseased and radioactive.
The Right Way:
Don't use objects, use hash maps. or dics. or whatever they're called in $LANG.
Write your constraints as data
Write a compilation/execution model which transforms the constraints to a function/callable object.
Apply it to your data.
Watch the Simple Made Easy Talk
Become enlightened
 
How would kiwis define the distinction between encapsulation and abstraction?
 
The Right Way:
Don't use objects, use hash maps. or dics. or whatever they're called in $LANG.
Write your constraints as data
Write a compilation/execution model which transforms the constraints to a function/callable object.
Apply it to your data.
Watch the Simple Made Easy Talk
Become enlightened
No this is the road towards growing a beard and living in the woods programming Haskell full time like that one Debian developer.

e:
Sanitizing input through structured exception handling in a method is not The Right Way?
It is but you've created a way in which you can't do that in any reasonable manner where the code looks good. You're going to get into a forest of conditionals.
 
Last edited:
No this is the road towards growing a beard and living in the woods programming Haskell full time like that one Debian developer.
Yeah exactly. Like he said:
The Right Way

Rather, it's a mechanism for how to implement abstraction.
He's right, @Dick Justice.

encapsulation means that every object is its own thing: it has a properly (and staticly) defined interface and everything else in the program only acts on it through that interface, which means the internals can be whatever you want and can even change at will,

Since each object is its own thing and you only ever interact with it through an interface, then this encapsulation applies recursively throughout your entire program by definition (if all of your objects are encapsulated, then their composites are typically well-behaved too). So then you can sensibly think of your program in terms of abstractions: groups of objects or layers (or modules) interacting together that are themselves encapsulated and only transact through interfaces.

Encapsulation is a way of hiding state modification from yourself, tricking yourself into thinking your code is simpler, right before it blows up in your face due to ConcurrentModificationException.
You should check out a programming language called Clojure sometime, I think you'd enjoy it @Shoggoth.
 
I'm pretty sure this is sincere and not a parody, but who knows.
QBasic would've been a bit outdated in 2006 but I dunno, maybe it was just a joke, just for fun. Back then not everything was wrapped in 20 layers of irony and carefully optimized to get the most amount of clicks. YouTube was almost completely new in 2006, too, after all. btw. it's weird to see comments under videos that have timestamps like "14 years ago". One day some comment threads on some huge places like YouTube that'll probably not sink will be so old that you can kinda assume that some of the people who wrote in them are dead now. Get that feel sometimes when I dig through old software from the 80s and 90s. Reasonable to think that at least some of the authors might not be alive anymore. Life's short.
 
Hello CodeNiggers, How do you usually study theory/theoretic topic? MIT OCW and coursera? Books? Diving into a practical application of said topic?
 
working on some unity shit for fun. learning about meshes. i know nothing about rendering so it's making me unhappy.
Graphics are a huge, finicky and miserable topic, unfortunately. I've found it much more helpful to make a small (very small) project first with DirectX or OpenGL so that the cause/effect between various steps becomes more obvious. Unity tends to hide a lot of order of operations from you, which can make the entire process a lot more mysterious of how you get from 24 vertices to a realistic box.
 
Hello CodeNiggers, How do you usually study theory/theoretic topic? MIT OCW and coursera? Books? Diving into a practical application of said topic?
The latter. I have to actually use something to really learn it; otherwise it's just my eyes running over a page. Failing that, taking notes helps for me. Something about rewriting what I'm reading in my own words helps me remember it; maybe it's because I have to slow down and think about it for longer than I would if I'm just reading over it. That's just me, though.
 
Back