Author Topic: Micro Phython language and board  (Read 14234 times)

0 Members and 1 Guest are viewing this topic.

Offline fake-name

  • Regular Contributor
  • *
  • Posts: 75
Re: Micro Phython language and board
« Reply #25 on: December 21, 2013, 12:31:15 pm »
The only valid python gripes I've read so far are: 1) whitespacewtf and [...snip...] The whitespacewtf is also one of my gripes with python (I mean seriously guys, tabs as a language construct? dieeeee!) but in regular use this does not turn out to be much of an issue. It's dumb, stupid, moronic and some other things, but it doesn't get in the way of coding.

I have to say I don't really get the whitespace complaints. If there was some way to write C code that used indentation as the block delimiter, you could probably take any C project I've written, remove the curly-braces, and compile it using that tool with no changes.

The only reason I can see for complaining about this is that you are used to writing C or whatever language *without* indentation, in which case you are programming wrong. Period.

---

There are plenty of legitimate complaints (2-3 transition has been messy, arguably lack of private and static vars, etc...), but the block delimiter is not one of them.
 

Offline mrflibble

  • Super Contributor
  • ***
  • Posts: 2051
  • Country: nl
Re: Micro Phython language and board
« Reply #26 on: December 21, 2013, 01:28:52 pm »
Considering the type of crap churned out by "non-programmers", having a language that enforces at least some structure can only be a good thing.
Considering the type of crap churned out by "programmers", having code reviews and giving the boot to those that consistently have no clue can only be a good thing. Which is my special way of saying that I've heard the argument of "it will provide more consistent code" before, but I have yet to witness this effect. Just like with any other language there is nice and readible python code, and there is inconsistent crap. So, nope, so far haven't really seen any evidence to that effect.

Anyways, I don't care overly much about the whitespace issue since like I already said it doesn't really get in the way of coding. But it doesn't really offer any tangible benefits as far as I'm concerned.

And indeed lack of private and static is also annoying. Note that I did not say the two I listed are the only issues. I said they were (IMO) the only two legit ones on free_electron's list of issues. Of which only one actually gets in the way of coding (2.x / 3.x library transition).
 

alm

  • Guest
Re: Micro Phython language and board
« Reply #27 on: December 21, 2013, 02:14:35 pm »
I like the mandatory indentation for teaching people to code: beginners starting out with trivial programs (their first if statement, their first for loop) sometimes fail to see the point of indenting the three line blocks they write. A language that uses indentation to mark blocks makes it much easier to learn sensible indentation.
 

Offline MacAttak

  • Supporter
  • ****
  • Posts: 683
  • Country: us
Re: Micro Python language and board
« Reply #28 on: December 22, 2013, 08:52:59 am »
The whitespace issue is mainly a problem because of the variance in different editors when it comes to tab/space conversion (and showing a difference between tab and space characters). Personally, I indent my code anyways when using braces in C-style languages anyways so python's structure isn't visually unappealing to me. It's when you work in a team and some jackhole insists on using an editor that converts spaces to tabs or vice versa.

I don't understand the limitations of statics and privates though? As far as I know, python supports both static fields as well as static methods. And you can always achieve the equivalence of a private member by using closures. This technique is very widespread now due to its heavy usage in modern JavaScript libraries.
 

Online Marco

  • Super Contributor
  • ***
  • Posts: 6950
  • Country: nl
Re: Micro Phython language and board
« Reply #29 on: December 22, 2013, 07:24:07 pm »
They should have just made the interpreter refuse code with tab indentation by default, force people to either use an editor with space replacement OR if they are sufficiently sure they will never screw tab/space indentation up let them override the behaviour. Instead you need a command line option even to get warnings of tab/space mixing.

Regardless of the validity of whitespace indentation with the best practices, the interpreter rewards wrong practices with not even a warning ...

PS. oh I see I'm out of date, with version 3 they finally realized this too ... lil late.
« Last Edit: December 22, 2013, 07:37:11 pm by Marco »
 

Offline mrflibble

  • Super Contributor
  • ***
  • Posts: 2051
  • Country: nl
Re: Micro Python language and board
« Reply #30 on: December 23, 2013, 03:56:49 am »
I don't understand the limitations of statics and privates though? As far as I know, python supports both static fields as well as static methods. And you can always achieve the equivalence of a private member by using closures. This technique is very widespread now due to its heavy usage in modern JavaScript libraries.

Thanks! I am such a python n00b... Also, I love user error. It's easy to fix. :)
 

Offline MacAttak

  • Supporter
  • ****
  • Posts: 683
  • Country: us
Re: Micro Phython language and board
« Reply #31 on: January 11, 2014, 01:11:54 am »
The open-source activity on this one has really surprised me. Source code and schematics / pcb layout for the reference board were recently published on github, and there has been a huge amount of discussion and patch submissions (hundreds of commits already, in just barely more than a single week!).

I expected some popularity of this project, but not quite so much enthusiastic support from the community.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf