Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

I just invented a new programming language!

Discussion in 'General Discussion' started by TheGaul, Nov 8, 2019.

  1. TheGaul

    TheGaul

    Joined:
    Apr 15, 2019
    Posts:
    199
    I've thought of another improvment. To define an array from 1 to 10 just type:
    Code (CSharp):
    1. x 1 10
    This defines a list from 1 to 10 and stores it in x. But you can use the same syntax to iterate through the list:
    Code (CSharp):
    1. x 1 10
    2.    @ x*x
    All indented lines iterate through the list. (Yes this is very unreadable I know!!!!)

    To write the 3rd element in the list just write:
    Code (CSharp):
    1. @ x 3
     
  2. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    10,084
    This looks positively unreadable at a glance. Abstractions in place now kinda exist for several reasons and readability is a big one.
     
    Ryiah likes this.
  3. TheGaul

    TheGaul

    Joined:
    Apr 15, 2019
    Posts:
    199
    Yes, it's the fast writable, totally unreable skeleteon language™. I think it will be a hit. I think you could train your brain to understand it.
     
  4. Ony

    Ony

    Joined:
    Apr 26, 2009
    Posts:
    1,977
    Is this sarcasm? Because I read it as sarcasm.

    Can we be clear, here, though? You're not talking about a game development team, but rather an enterprise team, correct? The two are not the same. You working for some company with forty other developers on business software isn't the same thing as you working with your brother on a game. Saying "40 developers on my team" is misleading, I think, in this context.
     
    Last edited: Nov 8, 2019
    Lurking-Ninja, Ryiah and Antypodish like this.
  5. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    10,084
    Or I could just use the tab key and intellisense, a tool that's proven itself genuinely useful over "well it takes less time to type (debatable) and you have to train yourself even more than with other languages to understand it."

    Typing, as stated, does not take up a significant amount of development time. The actual development process is the real issue, requiring you to actually be able to read at a glance. What you have done is made a language that is superficially less work.

    And to that, thinking about this language and using it, I have to ask:

    Why should I bother?
     
    Lurking-Ninja and Ryiah like this.
  6. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    No its not sarcasm, and no maintainability between enterprise and game domains have very much in common.
     
  7. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    What OP has created is something we in the enterprise world calls a domain specific language. It has its uses, especially if you have a complex domain with alot of mathematical algorithms
     
  8. frosted

    frosted

    Joined:
    Jan 17, 2014
    Posts:
    4,044
    Var is really nice for a lot of stuff, especially if you're using generics or have absurd compounded class names. But if the class names are relatively short (like around 6 letters) explicit can add a lot of clarity.

    Its often nice to use explicit typing on numerics to clarify between float, int, double, etc. It's sometimes helpful to use when differentiating vector3 from floats.

    Another example is Color32, I generally would prefer this to be made explicit. I've made a lot of mistakes assigning a value of 1 to Color32, resulting in close to black results and really annoying bugs.

    Just generally, in terms of readability, I tend to think that explicit naming is better as long as the class names are short. When class names are long or you need to use type params for generics and crap, obviously var pulls ahead in clarity.
     
    Ryiah and Ony like this.
  9. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    If it adds clarity its because you have bad naming, too long method blocks, bad seperation, low cohesion or a combo of them
     
  10. iamthwee

    iamthwee

    Joined:
    Nov 27, 2015
    Posts:
    2,149
    I've also created my own domain specific language. But my friend thinks it is nothing but a series of 0's and 1's.
     
    AndersMalmgren and Ony like this.
  11. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,754
    Lets wait for consumer grade quantum computer. What then will say? :D
     
  12. iamthwee

    iamthwee

    Joined:
    Nov 27, 2015
    Posts:
    2,149
    It's nothing but a series of positive or negatively charged particles where its state is completely dependent on the point of observation.
     
  13. iamthwee

    iamthwee

    Joined:
    Nov 27, 2015
    Posts:
    2,149
    I work inside a company of 250 thousand! I say as I stock the fruit and veg shelf in my big supermarket chain ;)
     
  14. iamthwee

    iamthwee

    Joined:
    Nov 27, 2015
    Posts:
    2,149
    For the record Ony I think your comments are cute. And parentheses come in useful for making smiley or unhappy faces ;)
     
    Ony likes this.
  15. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    20,966
    My mind suddenly produced the image of a college student being paid to sit at a desk and stare at specific points on the system while it works. :p
     
    Kiwasi, Ony and iamthwee like this.
  16. iamthwee

    iamthwee

    Joined:
    Nov 27, 2015
    Posts:
    2,149
    Your mind is like an enigma Ryiah, either that or you're an enhanced prototype for google's new search engine :D
     
    Ony likes this.
  17. tonialatalo

    tonialatalo

    Joined:
    Apr 23, 2015
    Posts:
    60
    Is somehow like Lisp but without brackets :D .. there you also don't have 'if' and 'for' and such, what is in a function is just returned. typical in functional langs. but yah i guess yours is actually closer to coffee and python.

    Code (JavaScript):
    1.     (let
    2.     ((F1 (fibonacci (- N 1)))
    3.      (F2 (fibonacci (- N 2))))
    4.       (+ F1 F2))
    (from https://www2.cs.sfu.ca/CourseCentral/310/pwfong/Lisp/1/tutorial1.html)

    But that's beside the point.. cool work!

    And yes I figure using Coffeescript for Unity could work .. by generating C# from it, like it is typically generated to Javascript. It has the class keyword and all so can be straightforward .. maybe workable if you just restrict to doing it so that it works for C# and Unity. Maybe strange at points cause it is basically Javascript still.. but anyhow would work somehow.
     
  18. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    6,493
    I find it interesting that bracket programmer find this less readable where I got it without any training, it just clicked.

    Also whenever a bracket programmer say indentation make think unreadable, python become more popular, so keep saying it :D

    Too bad quantum computers are in a state of existing and not existing at the same time.
     
    koirat likes this.
  19. koirat

    koirat

    Joined:
    Jul 7, 2012
    Posts:
    2,068
    Let me add to the flame.

    "var" sucks for readability.
    Also having types help me find particular lines of code just by scrolling through source or by built-in search.

    I only use it when:
    - I have to.
    - I'm lazy.
    - sometimes when variable scope is super small (few lines)
    - I'm prototyping method when the object might change in a matter of minutes.
    - I will have few similar blocks of code so when I copy paste I don't have to change all the type names manually.
     
    Jingle-Fett, Ony and Ryiah like this.
  20. Player7

    Player7

    Joined:
    Oct 21, 2015
    Posts:
    1,533
    "Mainly it involves just removing as much extraneous characters as possible."

    Looks like unreadable crap, which isn't so far off from javascrap itself these days.

    It's like the opposite of C++ which is the other extreme of engineered symbol S*** everywhere. I prefer the sane balance of java/.net in a language.. like good English with punctuation ...also IDE's can work better and allow a developer to easily maintain and understand code quicker with languages that use things like brackets and actual typed variables.

    And offtopic who is the idiot on the typescrap language development team who decided putting the variable type after the name ie ...
    let color: string = "blue";
    or ...
    function S***Language(message: string)

    ...breaking from the norm of most other popular language conventions

    Also why I hate over-hyped modern crap like python, nothing worse than a condition block and something in it that looks like maybe it was part of the condition or ..maybe it was outside the block.. maybe if the idiot who wrote it used a better language and put brackets {} surrounding the condition it would make more sense at a quicker glance.

    or maybe these S***ty languages are just for some idiots job security,
     
  21. koirat

    koirat

    Joined:
    Jul 7, 2012
    Posts:
    2,068
    That's why they are called "Supercomputers" they are in a state of superposition.
     
  22. Ony

    Ony

    Joined:
    Apr 26, 2009
    Posts:
    1,977
    Yeah, but tell us how you really feel.
     
  23. Player7

    Player7

    Joined:
    Oct 21, 2015
    Posts:
    1,533
    ...I couldn't explain it any better than that :)
     
    Ony likes this.
  24. Aiursrage2k

    Aiursrage2k

    Joined:
    Nov 1, 2009
    Posts:
    4,835
    Very interesting can you run this at runtime? One thing I was looking for before was a way to do runtime scripting using a visual editor to make it easy for non-programmers to create experiences at runtime.
     
  25. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    6,493
    Programmer politics war are always fun to watch and participate, everyone is right, everyone is wrong, opinionated truth! :D the safest wars
     
    Ony and frosted like this.
  26. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
  27. BIGTIMEMASTER

    BIGTIMEMASTER

    Joined:
    Jun 1, 2017
    Posts:
    5,181
    I invented new kind of art. Look:




    See? It eliminates all.the stuff that distracts from the big idea.

    Look into it and you.will.understand.
     
    Kiwasi and Aiursrage2k like this.
  28. Player7

    Player7

    Joined:
    Oct 21, 2015
    Posts:
    1,533
    https://render.fineartamerica.com/i...mages-medium-5/digital-rain-semmick-photo.jpg
    I don't even like nodes for coding, texturing, shader preview stuff totally fine... but maybe 3d nodes would up the novelty factor of using them for anything.

    or maybe something like this...

    this is how unity's debugger should look like at some point after 2020 right?

    you can even make live changes and to the multithreaded string of streams right..its all connected..somehow.. and errm yeah.
     
  29. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
  30. iamthwee

    iamthwee

    Joined:
    Nov 27, 2015
    Posts:
    2,149
    I'm sorry I don't see how that's applicable to programming, all I see is 'blonde, brunette or red head'

    P.S well done for hippo being awake at 4.00am like me!
     
    Player7 and Antypodish like this.
  31. iamthwee

    iamthwee

    Joined:
    Nov 27, 2015
    Posts:
    2,149
    Why did this post not get any likes? You guys are just pretentious. Nodes rock and so does python. Give the OP some credit. SMH/
     
  32. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,754
    I gave OP's invention slight credit of usefulness. That best I can do.
     
  33. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    20,966
    I thought he was referring to @hippocoder's post. :p
     
  34. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,754
    I need admit, shader graphs does the job for such noob like me. However hippo has more kudos from me, than brackets in python, so one less won't hurt him :)
     
    Ryiah likes this.