Loose Lips

Community Forums/Monkey2 Talk/Loose Lips

skid(Posted 2015) [#1]
As I have no intention of suggesting monkey2 be any less strict than what Mark says, this is about a looser dialect that in no way intended to impact discussion of .monkey standards.

My personal preference is less typing and less reading.

Visually name$ wins over name:String every day and typing and reading the word Local is redundant too.

So:

- different suffix for source, not .monkey with preprocessor tool for converting .loose ->.monkey

- the : symbol only used on types, not primitives

- a parser that rejects all use of ":Primitive" and requires % # and $ on first LHS use of all names

- no more local - use of %#$: on left equates to a Local declaration for types


I am tempted to suggest Field gets same treatment as Local and made redundant / inferred.

I worship brevity in math and code, i would prefer my code to look like math. My brain finds it hard when confronted with too much symantics and I just think primitive types look friendlier.

The educational part of this project would be to try using /extending the monkey 2 parser stack for something other than monkey 2 translations so even if pointless still a healthy academic exercise perhaps?


Paul - Taiphoz(Posted 2015) [#2]
I can get where your coming from but being Dyslexic I am the other way, I love the fact that variables are defined the way they are it reminds me of pascal and my var statments after my begin's, for me " Something$ " is way harder for me to read than " Something : String ".


degac(Posted 2015) [#3]
I don't really understand the need of writing :String :Int etc ... it should be the preprocessor/compiler (or even IDE) to convert $ % # etc in the 'proper' definition.
Surely there are valid reason for this (although MX1 & BMX allow this without problems) - but I would like to have the possibility to read my code with my own 'way' of writing ($,%,#) without automatic conversion.

ps:

I agree with Skid about 'Local' use - one thing I like from C & Co it's this
float x,y,z  'very readable and no problem of interpretation (for human thing!)

In BMX, mx1 and mx2 you still need to
Local x:float,y:float,z:float
Local x#,y#,z# 'what is more clear to read?

I would like to see something like (ugly I know)
Local Float x,y,z  'I suppose using Local # x,y,z will be terrifying for the parser (#is the marker for compiler directive!) 



GC-Martijn(Posted 2015) [#4]
Well I have said this to many times now in several topics.
What mark needs to make is a simple poll/vote page with those idea's.
Thing is that those idea's/suggestions/feelings are personal, and they need to be voted and at the end its for mark to make the decision.

Its not that hard to make a simple vote.php page with multiple polls for members only.

For example my vote is for not using the #%$ syntax, I did love it several years ago, but after not using it anymore for a while, I don't want back.
So this poll would be:

----------------------------------
Using #%$ syntax
YES: 2
NO: 1
----------------------------------
or copy past this text and reply below and do the math...


degac(Posted 2015) [#5]
I really doubt Mark will accept polls... MX2 is his own creature!
He's already answered (in other post/thread) about the fact that this *should* be a job for IDE...
If you read the first post from Skid


As I have no intention of suggesting monkey2 be any less strict than what Mark says, this is about a looser dialect that in no way intended to impact discussion of .monkey standards.

My personal preference is less typing and less reading.



ps: in your poll you missed 'INDIFFERENT' as possible result...


GC-Martijn(Posted 2015) [#6]
> I really doubt Mark will accept polls... MX2 is his own creature!
Sure, that's why he gets the super vote at the end ;) its his project, but then he knows the opinion from his users.
And people can see on one page what is going on.

I don't know how open source MX2 is but I think I can give some light about things.

Is it not interesting when you see this for example:
----------------------------------
Using #%$ syntax
YES: 89
NO: 5
DON'T CARE: 9
----------------------------------

But I think another problem will be the number of people that are going to vote.
Maybe you have to link it to the total forum star rank, so some people get more power to vote.


Nobuyuki(Posted 2015) [#7]
I personally think type sigils are terrible and make for poor reading comprehension. But, I also believe that about curly braces. Type sigils are one thing that I distinctly remember back when I was first learning code in QBASIC as a child, and also one of the last things for me to understand was "type correctness". I personally think for comprehension, they're no good. But they're great for shortcuts, as long as I don't have to read them. That's why I'm happy they exist in Jungle, and use them there when I have to type a function/method with a lot of arguments.

As for variable scoping...... I do like "Dim/var/let" better, but I am happy with using it the current way now because, again, it feels like it makes the code much easier to read. Scope resolution of variables (I'm presuming) are easier for IDEs to figure out on the fly, and this makes variable highlighting pretty darn sweet.

Anyway, with Paul on this one. Verbosity in the right places for me, most other languages get this wrong. I find many people's MonkeyX code difficult to read, and few here seem to comment their bigger blocks of code much, on top of all the other shortcuts they tend to take (whyyy?)


Paul - Taiphoz(Posted 2015) [#8]
I also think leaving it upto the IDE might be a bad idea as it will allow situations where some one posts code here written in IDE X and some one else copy pastes it into their IDE Y where one of those handles something$ and the other does not.


marksibly(Posted 2015) [#9]
> it should be the preprocessor/compiler (or even IDE)

I really think this should be up to the IDE. If IDE's are already converting #,%,$ to :Float, :Int, :String (which was news to me) this indicates to me that people at least prefer to 'read' words, not shortcuts, in code, so I think this is what the language should support.

I just don't like the language supporting both '%, '#' etc and ':Int', ':Float' - it can make it look too much like 2 quite different languages.

And if expansion to ':Int', ':Float' etc is a popular feature (and I assume it is) I'll make sure to add it to Ted2.

> What mark needs to make is a simple poll/vote page with those idea's.

To be honest, I don't think there's a large enough number of active users to make this worthwhile just yet - I think results would be well within any margin of error! Perhaps an idea for when things are a bit further along and there are more people involved (preferably some non-monkey users too).

> I also think leaving it upto the IDE might be a bad idea

If the language only handles :Int, :Float etc, and any shortcut expansion is left completely up to the IDE, it's a non-problem because people will only be pasting 'expanded' code in the first place.


Xaron(Posted 2015) [#10]
I agree on readability.


skid(Posted 2015) [#11]
If I do attempt a more terse style I will try and drop Local, Field and End also.

I agree on the IDE integration front and will make sure my terse coding style is never stored as such on disk. No one need ever know...