[ / / / / / / / / ] [ b / news+ / boards ] [ operate / meta ] [ ]

/gentoo/ - Technology

Install gentoo.

Catalog

Name
Email
Subject
Comment *
File
* = required field[▶ Show post options & limits]
Confused? See the FAQ.
Options
Password (For file and post deletion.)

Allowed file types: jpg, jpeg, gif, png, webm, mp4
Max filesize is 8 MB.
Max image dimensions are 10000 x 10000.
You may upload 1 per post.


File: 1417598240891.png (47.4 KB, 1412x1234, 706:617, KXN9qCc.png)

 No.476

Remember C+=?
I just encountered something interesting while listening to one of Jonathan Blow's streams.

>There is to be *no encapsulation*: don't tell me to protect my members, tell other functions not to access them!


Sounds hilarious, but this is actually a pretty cool idea. I'm not saying that functions shouldn't be allowed to define their own scope, but what if a function could limit the symbols that it has access to?

This is the video.

https://www.youtube.com/watch?feature=player_detailpage&v=5Nc68IdNKdg&list=UUCuoqzrsHlwv1YyPKLuMDUQ#t=3143

He explains the merits of this this about 50 minutes in.

Thoughts?

 No.484

The talk has nothing to do with C+=

 No.492

>what if a function could limit the symbols that it has access to
this sounds just like purely functional programming languages.

no global data, no change of state. what you receive in your arguments are the only assets the function can use, and you never get to modify the originals, you only use their values to compute a result.

 No.501

>>492
>what you receive in your arguments are the only assets the function can use
That's not what pure functional means.
Constants like Pi are fine.



Delete Post [ ]
[]
[Return][Go to top][Catalog]
[ / / / / / / / / ] [ b / news+ / boards ] [ operate / meta ] [ ]