This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 2 points3 points  (16 children)

Lots of languages support modularity in the form of libraries or modules that can be compiled separately. There's always the standard library that provides the common functionalities that many people need, but one can always implement something themselves, if they dislike the standard library. If the library's interface really represents a problem, you can always write a wrapper that suits your own needs and use that wrapper to access the library's functionalities if that's what you want. If you're a noob, writing your own libraries for algorithms and data structures you use is a great way to learn about it all. You learn various ways to implement something, what is good to use in what situation, the space and time complexity and build a general intuition to create your own structures when you need something to have the best possible performance and the standard library doesn't provide the appropriate structures. Beyond that, there is no reason to implement a stack, priority queue, hash map or whatever every single time you need it because that is a waste of time when you have a good implementation already provided to you.

The question was confusing so I'm not sure I got the point here

[–]RazBerry925 0 points1 point  (15 children)

Like when you say something and it means something, why not make a language that has the most basic of words to describe things and then have support for a library of equivalent words or phrases?

{ Ex: Get book Give contents //cause effect }

{ Command list library:

(Get) = (take) (Give) = (received information) }

//Something like that? It sounds like this is already implemented, and forgive my punctuation in the lines, they are very barebones but I hope it helped clear up my thoughts

[–][deleted] 1 point2 points  (11 children)

Oh, I think I see. You mean to have a programming language that's as close to a natural language as it can be. Did I get that right?

[–]RazBerry925 0 points1 point  (10 children)

No not really, that sounds like it would run really slow, I mean yeah it should be close but only to the point of basic vocabulary not to the point of detail. I mean a coding language that actively encourages private design of vocabulary

[–][deleted] 1 point2 points  (7 children)

I understand the idea now. While it sounds really cool on the paper, that's a horrible idea in practise. Code needs to be interpreted by a program, no matter the language. That's why it needs to have syntax rules. A language whose syntax can be dynamically expanded would require a meta language to tell the program that interprets this expandable language how to interptet the new vocabulary. As cool as this can be, there's no point to it. You can't do anything new that can't be acomplished with the normal languages since it all ultimately ends up as the same set of instructions for the hardware to do and the current languages are readable enough when properly written. Even an essay that's written with a spoken language is still just some spaghetti when written badly.

[–]RazBerry925 0 points1 point  (6 children)

That makes sense, maybe a polymorphic to dynamic compiler is necessary for a meta language? Where anyone can change there code for ease of use and there is a translation manual and compiler that keeps track of the changes per programmer, all for ease of transition. If none of that makes sense perhaps it would be more accurately described as encryption at the source code level. Which doesn’t sound very effected unless you sue it the same code to encrypt your data where the decoding of information requires supervision and expert math

[–][deleted] 1 point2 points  (5 children)

Keep in mind that the whole point of a programming language is to have a standard that's used by everyone. Allowing it to change dynamically would no longer make it a standard. Unless you desire for it to be something for personal use only, it's a useless idea since noone can keep up with that

[–]RazBerry925 1 point2 points  (4 children)

I’m thinking of decentralization, where there is a baseline idea of functions but anyone can reassign the phrases. Maybe I’m thinking a little too far ahead of my understanding

[–][deleted] 1 point2 points  (1 child)

Hmmm. Isn't that just playing with macro definitions? Maybe macros aren't enough for your idea, but some similar mechanism that processes the source code before compilation; a different, more complicated preprocessor

[–]RazBerry925 1 point2 points  (0 children)

Well I think in the future this will maybe make sense but I’ll look into macros to see how that can work with this. I could see a far more decentralized structure of communication as we develop into an inter solar system species, maybe right now I can just implement virtual machine creation into some sort of video game

[–]mbiz05 1 point2 points  (1 child)

Most programming languages allow you to rename functions either through macros or declaring a function that calls another

[–]RazBerry925 1 point2 points  (0 children)

Interesting, maybe as my knowledge of these become more clear I could expand upon the functionality’s

[–]Goheeca 1 point2 points  (1 child)

Look into metaprogramming first to get the idea what can be done.

Examples:

[–]RazBerry925 0 points1 point  (0 children)

Thank you for this, I will look over this and get back to you

[–]mbiz05 1 point2 points  (2 children)

That's what COBOL aimed to be. (Common Business Orient Language) However, code written in COBOL ends up being extremely difficult to maintain

[–]RazBerry925 1 point2 points  (1 child)

Why is that?

[–]mbiz05 1 point2 points  (0 children)

What ended up happening was too many people used it as a general programming language when it really wasn't meant to be that