Re: Scala considering significant indentation like Python

2017-05-25 Thread Rustom Mody
On Wednesday, May 24, 2017 at 8:01:53 PM UTC+5:30, Rustom Mody wrote:
> On Wednesday, May 24, 2017 at 2:14:15 AM UTC+5:30, Ben Finney wrote:
> > Grant Edwards grant.b.edwards writes:
> > 
> > > On 2017-05-23, Michael Torrie  wrote:
> > > > Sometimes things get longer than a page (like a class definition).
> > >
> > > A nice folding mode works nicely for that sort of thing. I normally
> > > use emacs, but it doesn't seem to have a folding mode built-in, and
> > > the add-on one's I've tried didn't seem to work in a very useful way.
> > 
> > The ‘set-selective-display’ command will collapse the current buffer's
> > text to lines indented to the specified number of columns; the same
> > command with no argument will expand the buffer to normal again. The
> > command is bound to ‘C-x $’ in default Emacs.
> 
> I would have thought hideshow minor mode is what is desired??
> 
> M-x (info "(emacs)Hideshow")
> 
> Which however happens to have rather ridiculous keybindings
> If you like org-mode style TAB and Shift-TAB here's a hack  — barely tried 
> out!!
> 
> --
> ;; Add to your init
> ;; To get Tab and Shift-Tab to behave as in org-mode
> 
> (defvar rusi/hs-hide nil "Current state of hideshow for toggling all.")
> ;;;###autoload
> (defun rusi/hs-toggle-all () "Toggle hideshow all."
>   (interactive)
>   (setq rusi/hs-hide (not rusi/hs-hide))
>   (if rusi/hs-hide
>   (hs-hide-all)
> (hs-show-all)))
> 
> (add-hook 'hs-minor-mode-hook
> (lambda ()
>   (define-key hs-minor-mode-map (kbd "") 'rusi/hs-toggle-all)
>   (define-key hs-minor-mode-map (kbd "") 'hs-toggle-hiding)))
> 
> (add-hook 'python-mode-hook 'hs-minor-mode)
> (add-hook 'c-mode-hook  'hs-minor-mode)
> (add-hook 'emacs-lisp-mode-hook 'hs-minor-mode)
> ;; etc
> 
> --

There also this which seems to be more polished than my 4-line hack
https://github.com/shanecelis/hideshow-org

[All of which Grant Edwards probably wont see because this is posted from 
google groups]
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Scala considering significant indentation like Python

2017-05-24 Thread Rustom Mody
On Wednesday, May 24, 2017 at 2:14:15 AM UTC+5:30, Ben Finney wrote:
> Grant Edwards grant.b.edwards writes:
> 
> > On 2017-05-23, Michael Torrie  wrote:
> > > Sometimes things get longer than a page (like a class definition).
> >
> > A nice folding mode works nicely for that sort of thing. I normally
> > use emacs, but it doesn't seem to have a folding mode built-in, and
> > the add-on one's I've tried didn't seem to work in a very useful way.
> 
> The ‘set-selective-display’ command will collapse the current buffer's
> text to lines indented to the specified number of columns; the same
> command with no argument will expand the buffer to normal again. The
> command is bound to ‘C-x $’ in default Emacs.

I would have thought hideshow minor mode is what is desired??

(info "(emacs)Hideshow")

Which however happens to have rather ridiculous keybindings
If you like org-mode style TAB and Shift-TAB here's a hack  — barely tried out!!

--
;; Add to your init
;; To get Tab and Shift-Tab to behave as in org-mode

(defvar rusi/hs-hide nil "Current state of hideshow for toggling all.")
;;;###autoload
(defun rusi/hs-toggle-all () "Toggle hideshow all."
  (interactive)
  (setq rusi/hs-hide (not rusi/hs-hide))
  (if rusi/hs-hide
  (hs-hide-all)
(hs-show-all)))

(add-hook 'hs-minor-mode-hook
  (lambda ()
(define-key hs-minor-mode-map (kbd "") 'rusi/hs-toggle-all)
(define-key hs-minor-mode-map (kbd "") 'hs-toggle-hiding)))

(add-hook 'python-mode-hook 'hs-minor-mode)
(add-hook 'c-mode-hook  'hs-minor-mode)
(add-hook 'emacs-lisp-mode-hook 'hs-minor-mode)
;; etc

--
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Scala considering significant indentation like Python

2017-05-24 Thread Grant Edwards
On 2017-05-23, Ben Finney  wrote:
> Grant Edwards  writes:
>
>> On 2017-05-23, Michael Torrie  wrote:
>> > Sometimes things get longer than a page (like a class definition).
>>
>> A nice folding mode works nicely for that sort of thing. I normally
>> use emacs, but it doesn't seem to have a folding mode built-in, and
>> the add-on one's I've tried didn't seem to work in a very useful way.
>
> The ‘set-selective-display’ command will collapse the current buffer's
> text to lines indented to the specified number of columns; the same
> command with no argument will expand the buffer to normal again. The
> command is bound to ‘C-x $’ in default Emacs.

Thanks for the tip!

I'd been looking at folding modes, and never ran across that.

-- 
Grant Edwards   grant.b.edwardsYow! I own seven-eighths of
  at   all the artists in downtown
  gmail.comBurbank!

-- 
https://mail.python.org/mailman/listinfo/python-list


Emacs command to select only lines indented below a specified level (was: Scala considering significant indentation like Python)

2017-05-23 Thread Ben Finney
Fred Stluka  writes:

> On 5/23/17 4:43 PM, Ben Finney wrote:
>
> > The ‘set-selective-display’ command […] is bound to ‘C-x $’ in
> > default Emacs.
>
> How do I specify the number of columns when using "C-x $"?

You will remember, from doing the Emacs tutorial when you first learned
Emacs, that all commands have a “prefix argument” available
 that the command
can use to modify its behaviour.

So, use the prefix argument to specify the number of columns for
‘set-selective-display’.

E.g.:

M-9 C-x $  # Indentation >= 9 disappears.
C-u C-x $  # Indentation >= 4 disappears.
C-u 1 3 C-x $  # Indentation >= 13 disappears.
C-u C-u C-u $  # Indentation >= 64 disappears.
C-x $  # All lines reappear.

etc.

> Same for using the command at the M-x prompt. I type "M-x" and see the
> M-x prompt, then then type "set-selective-display" using tab to
> autocomplete it. But I can't then type a column number after a space
> or in parens or anything. What am I missing?

Time to work through the Emacs tutorial again; ‘C-h t’ :-)

-- 
 \ “I call him Governor Bush because that's the only political |
  `\  office he's ever held legally.” —George Carlin, 2008 |
_o__)  |
Ben Finney

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Scala considering significant indentation like Python

2017-05-23 Thread Fred Stluka

On 5/23/17 4:43 PM, Ben Finney wrote:


The ‘set-selective-display’ command will collapse the current buffer's
text to lines indented to the specified number of columns; the same
command with no argument will expand the buffer to normal again. The
command is bound to ‘C-x $’ in default Emacs.

Ben,

How do I specify the number of columns when using "C-x $"?  It
doesn't prompt, and doesn't seem to take the current column of
the cursor position into account.  Just echoes:
selective-display set to nil.

Same for using the command at the M-x prompt.  I type "M-x"
and see the M-x prompt, then then type "set-selective-display"
using tab to autocomplete it.  But I can't then type a column
number after a space or in parens or anything.  What am I missing?

Thanks,
--Fred

Fred Stluka -- mailto:f...@bristle.com -- http://bristle.com/~fred/
Bristle Software, Inc -- http://bristle.com -- Glad to be of service!
Open Source: Without walls and fences, we need no Windows or Gates.



--
https://mail.python.org/mailman/listinfo/python-list


Re: Scala considering significant indentation like Python

2017-05-23 Thread Ben Finney
Grant Edwards  writes:

> On 2017-05-23, Michael Torrie  wrote:
> > Sometimes things get longer than a page (like a class definition).
>
> A nice folding mode works nicely for that sort of thing. I normally
> use emacs, but it doesn't seem to have a folding mode built-in, and
> the add-on one's I've tried didn't seem to work in a very useful way.

The ‘set-selective-display’ command will collapse the current buffer's
text to lines indented to the specified number of columns; the same
command with no argument will expand the buffer to normal again. The
command is bound to ‘C-x $’ in default Emacs.

-- 
 \   “Try to learn something about everything and everything about |
  `\  something.” —Thomas Henry Huxley |
_o__)  |
Ben Finney

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Scala considering significant indentation like Python

2017-05-23 Thread justin walters
On Tue, May 23, 2017 at 7:10 AM, Grant Edwards 
wrote:

> On 2017-05-23, Michael Torrie  wrote:
> > On 05/22/2017 02:57 PM, Ethan Furman wrote:
> >>> Kind of reminds me of LISP.  Lots of closing parenths, and often then
> >>> just all get stuck together on a long.  But I guess that's why they
> >>> invented paren matching shortcuts in editors.  To make it easy to see
> if
> >>> you have them matched up.  This works with braces too.  Perhaps there
> is
> >>> a plugin for Vim to jump back and forth between the beginning and end
> of
> >>> a blog?  Wouldn't be too hard to just look at indent.
> >
> > Sigh.  Missing words, the wrong words!  Block, not blog.  agg.
> >
> >> It's built-in, no plug-in necessary.
> >>
> >> I still find white-space indentation easier to read, though.  Is that
> > block 20 lines down inside or outside the above
> >> if/for/while?  Just put your cursor on it and go straight down and
> > you'll find out.  Not so easy if the braces aren't
> >> lined up (at least for me).
> >
> > True enough.  Would still be nice to jump, though.  Sometimes things get
> > longer than a page (like a class definition).
>
> A nice folding mode works nicely for that sort of thing.  I normally
> use emacs, but it doesn't seem to have a folding mode built-in, and
> the add-on one's I've tried didn't seem to work in a very useful way.
> I like the folding in Scite, and sometimes I fire it up when I'm
> trying to figure out the logic/flow/looping in unfamiliar code.
>

I don't know how well it's received here, but I find that Pycharm is
fantastic for
doing stuff like this. It does have code folding, auto-complete, auto close
parens, etc.

My favorite feature, however, is the project structure view. It allows you
to view
your project as a tree of variables, classes, and functions instead of
filesystem
directories. It's pretty neat to be honest.

The downside, of course, is that Pycharm is a lot heavier than most
editors.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Scala considering significant indentation like Python

2017-05-23 Thread Grant Edwards
On 2017-05-23, Michael Torrie  wrote:
> On 05/22/2017 02:57 PM, Ethan Furman wrote:
>>> Kind of reminds me of LISP.  Lots of closing parenths, and often then
>>> just all get stuck together on a long.  But I guess that's why they
>>> invented paren matching shortcuts in editors.  To make it easy to see if
>>> you have them matched up.  This works with braces too.  Perhaps there is
>>> a plugin for Vim to jump back and forth between the beginning and end of
>>> a blog?  Wouldn't be too hard to just look at indent.
>
> Sigh.  Missing words, the wrong words!  Block, not blog.  agg.
>
>> It's built-in, no plug-in necessary.
>>
>> I still find white-space indentation easier to read, though.  Is that
> block 20 lines down inside or outside the above
>> if/for/while?  Just put your cursor on it and go straight down and
> you'll find out.  Not so easy if the braces aren't
>> lined up (at least for me).
>
> True enough.  Would still be nice to jump, though.  Sometimes things get
> longer than a page (like a class definition).

A nice folding mode works nicely for that sort of thing.  I normally
use emacs, but it doesn't seem to have a folding mode built-in, and
the add-on one's I've tried didn't seem to work in a very useful way.
I like the folding in Scite, and sometimes I fire it up when I'm
trying to figure out the logic/flow/looping in unfamiliar code.

-- 
Grant Edwards   grant.b.edwardsYow! Thousands of days of
  at   civilians ... have produced
  gmail.coma ... feeling for the
   aesthetic modules --

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Scala considering significant indentation like Python

2017-05-22 Thread Mikhail V
> The creator of Scala, Martin Odersky, has proposed introducing Python-like
> significant indentation to Scala and getting rid of braces:
>
>   I was playing for a while now with ways to make Scala's syntax
>indentation-based. I always admired the neatness of Python syntax
>and also found that F# has benefited greatly from its optional
>indentation-based syntax, so much so that nobody seems to use
>the original syntax anymore.
>
> https://github.com/lampepfl/dotty/issues/2491


People sort of like indentation structuring.
It introduces some typography into source code representaion,
and restricts possibilities to [ugly]format the code.
I've looked quickly through the linked discussion, and not sure
if many think of the whole issue globally.

I understand the indentation, as well as many other syntactical tricks
as a trade-off for bringing nice code look in pure *textual* editors.
And that's one part of the indentation concept - a trade-off, assuming that one
looks at the code by means of relatively primitive text renderer.

Once I've came across this blog:
http://tratt.net/laurie/blog/entries/an_editor_for_composed_programs.html

This man seems to have the 'feel' for the whole issue and
I agree with his many points about the tendencies.

So to look slightly further than own nose -
I suppose the era of "char-by-char" code rendering/editing will not
last so long and code editors should deal with the code in
a structured way.
The question how exactly to show structure - as indent,
or vertical lines with nodes, will become just a user setup option,
same as colors, etc.
IOW for future human-oriented development environment,
the look of a source file in an average notepad should become
a secondary criteria, but a better *parse-ability* will become
primary criterion.

Even if speak about 'now' situation - looking e.g. into C code
I understand that braces are not the biggest problem for me.
I can ignore them more or less, but then come other readability
issues - lines starting with type names, unintuitive declarations,
asterisks jumping to the left or right depending on author's habits, etc.

So braces is not the major issue in the whole syntax problematics.
In some cases (though rare and if used with craft) they can help to avoid
unwanted indentations.
For sure an average indented Python code looks way better than
any 'braced' analogue and for common textual presentation
indented blocks is probably the optimal way.



Mikhail
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Scala considering significant indentation like Python

2017-05-22 Thread Michael Torrie
On 05/22/2017 02:57 PM, Ethan Furman wrote:
>> Kind of reminds me of LISP.  Lots of closing parenths, and often then
>> just all get stuck together on a long.  But I guess that's why they
>> invented paren matching shortcuts in editors.  To make it easy to see if
>> you have them matched up.  This works with braces too.  Perhaps there is
>> a plugin for Vim to jump back and forth between the beginning and end of
>> a blog?  Wouldn't be too hard to just look at indent.

Sigh.  Missing words, the wrong words!  Block, not blog.  agg.

> It's built-in, no plug-in necessary.
>
> I still find white-space indentation easier to read, though.  Is that
block 20 lines down inside or outside the above
> if/for/while?  Just put your cursor on it and go straight down and
you'll find out.  Not so easy if the braces aren't
> lined up (at least for me).

True enough.  Would still be nice to jump, though.  Sometimes things get
longer than a page (like a class definition).



-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Scala considering significant indentation like Python

2017-05-22 Thread Ethan Furman

On 05/22/2017 12:13 PM, Michael Torrie wrote:

On 05/22/2017 07:59 AM, Jussi Piitulainen wrote:

I am the inventor of multiple ends on the same line. This way, in a
language where all of several nested constructs end with an end - not
going to name the language but it's Julia - instead of

 end
 end
 end
 end
end,

one combines the uninformative lines into one by writing

end end end end end,

and with four-space indentation the ends align neatly with the starts.
Technically, the ends on the remaining line of ends are backwards.


Kind of reminds me of LISP.  Lots of closing parenths, and often then
just all get stuck together on a long.  But I guess that's why they
invented paren matching shortcuts in editors.  To make it easy to see if
you have them matched up.  This works with braces too.  Perhaps there is
a plugin for Vim to jump back and forth between the beginning and end of
a blog?  Wouldn't be too hard to just look at indent.


It's built-in, no plug-in necessary.

I still find white-space indentation easier to read, though.  Is that block 20 lines down inside or outside the above 
if/for/while?  Just put your cursor on it and go straight down and you'll find out.  Not so easy if the braces aren't 
lined up (at least for me).


--
~Ethan~

--
https://mail.python.org/mailman/listinfo/python-list


Re: Scala considering significant indentation like Python

2017-05-22 Thread Michael Torrie
On 05/22/2017 07:59 AM, Jussi Piitulainen wrote:
> I am the inventor of multiple ends on the same line. This way, in a
> language where all of several nested constructs end with an end - not
> going to name the language but it's Julia - instead of
> 
> end
> end
> end
> end
> end,
> 
> one combines the uninformative lines into one by writing
> 
> end end end end end,
> 
> and with four-space indentation the ends align neatly with the starts.
> Technically, the ends on the remaining line of ends are backwards.

Kind of reminds me of LISP.  Lots of closing parenths, and often then
just all get stuck together on a long.  But I guess that's why they
invented paren matching shortcuts in editors.  To make it easy to see if
you have them matched up.  This works with braces too.  Perhaps there is
a plugin for Vim to jump back and forth between the beginning and end of
a blog?  Wouldn't be too hard to just look at indent.

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Scala considering significant indentation like Python

2017-05-22 Thread oliver
Any nesting beyond third level should be strong candidate for refactoring.
Soon after you do that, big surprise, refactored block gets better
documented, gets used elsewhere, becomes testable on its own, etc. I.e. if
structure is not obvious from indentation alone, refactoring is the proper
solution, not braces.

Also deeply nested structures tend to involve variables in the deepest
levels that are also used in the outer levels, making the scope of
variables harder to manage (leading to similar bugs as result from use of
global variables).

So languages that do not require braces for code blocks encourage
refactoring, and hence clearer code structure, separation of concerns,
isolation of namespaces, etc.

On Mon, May 22, 2017, 09:31 Cholo Lennon  wrote:

> On 22/05/17 00:53, Steve D'Aprano wrote:
> > The creator of Scala, Martin Odersky, has proposed introducing
> Python-like
> > significant indentation to Scala and getting rid of braces:
> >
> >  I was playing for a while now with ways to make Scala's syntax
> >  indentation-based. I always admired the neatness of Python syntax
> >  and also found that F# has benefited greatly from its optional
> >  indentation-based syntax, so much so that nobody seems to use
> >  the original syntax anymore.
> >
> > https://github.com/lampepfl/dotty/issues/2491
> >
> >
> >
>
>  From the link:
>
> "Impediments
>
> What are the reasons for preferring braces over indentations?
>
> Provide visual clues where constructs end. With pure indentation based
> syntax it is sometimes hard to tell how many levels of indentation are
> terminated at some point... "
>
> I am a huge python fan (but also a C++ and Java fan) and I agree with
> Scala creator, sometimes the readability is complicated. So, more often
> than I would like to, I end up missing the braces :-O
>
>
> --
> Cholo Lennon
> Bs.As.
> ARG
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
Oliver
My StackOverflow contributions
My CodeProject articles
My Github projects
My SourceForget.net projects
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Scala considering significant indentation like Python

2017-05-22 Thread breamoreboy
On Monday, May 22, 2017 at 3:34:07 PM UTC+1, Serhiy Storchaka wrote:
> 22.05.17 17:24, Skip Montanaro пише:
> > On Mon, May 22, 2017 at 9:14 AM, bartc  wrote:
> >> I think 'end' can be used in Python too:
> >>
> >>   if (cond):
> >>   stmts
> >>   end
> >>
> >> But:
> >>
> >> - You need to define a dummy variable 'end'
> > 
> > Interesting idea. You can avoid the dummy variable part by just using
> > '#end', however:
> > 
> > if cond:
> >  stmts
> > #end
> 
> See pindent.py.

To save others looking it's in C:\Program Files\Python36\Tools\scripts on my 
setup.

Kindest regards.

Mark Lawrence.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Scala considering significant indentation like Python

2017-05-22 Thread Serhiy Storchaka

22.05.17 17:24, Skip Montanaro пише:

On Mon, May 22, 2017 at 9:14 AM, bartc  wrote:

I think 'end' can be used in Python too:

  if (cond):
  stmts
  end

But:

- You need to define a dummy variable 'end'


Interesting idea. You can avoid the dummy variable part by just using
'#end', however:

if cond:
 stmts
#end


See pindent.py.

--
https://mail.python.org/mailman/listinfo/python-list


Re: Scala considering significant indentation like Python

2017-05-22 Thread Skip Montanaro
On Mon, May 22, 2017 at 9:14 AM, bartc  wrote:
> I think 'end' can be used in Python too:
>
>  if (cond):
>  stmts
>  end
>
> But:
>
> - You need to define a dummy variable 'end'

Interesting idea. You can avoid the dummy variable part by just using
'#end', however:

if cond:
stmts
#end

Skip
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Scala considering significant indentation like Python

2017-05-22 Thread bartc

On 22/05/2017 14:59, Jussi Piitulainen wrote:

Cholo Lennon writes:




I am a huge python fan (but also a C++ and Java fan) and I agree with
Scala creator, sometimes the readability is complicated. So, more
often than I would like to, I end up missing the braces :-O


I am the inventor of multiple ends on the same line. This way, in a
language where all of several nested constructs end with an end - not
going to name the language but it's Julia - instead of

end
end
end
end
end,

one combines the uninformative lines into one by writing

end end end end end,

and with four-space indentation the ends align neatly with the starts.
Technically, the ends on the remaining line of ends are backwards.



I think 'end' can be used in Python too:

 if (cond):
 stmts
 end

But:

- You need to define a dummy variable 'end'

- It's not enforced nor checked by the language, it's only to aid
  readability, so ends may be placed incorrectly or left out

- Multple ends on one line need a comma separator:

  end, end, end

- No one actually does this so it can't solve any of the problems
  people might have with indentation


--
Bartc
--
https://mail.python.org/mailman/listinfo/python-list


Re: Scala considering significant indentation like Python

2017-05-22 Thread Jussi Piitulainen
Cholo Lennon writes:

> On 22/05/17 00:53, Steve D'Aprano wrote:
>> The creator of Scala, Martin Odersky, has proposed introducing
>> Python-like significant indentation to Scala and getting rid of
>> braces:
>>
>>  I was playing for a while now with ways to make Scala's syntax
>>  indentation-based. I always admired the neatness of Python
>>  syntax and also found that F# has benefited greatly from its
>>  optional indentation-based syntax, so much so that nobody seems
>>  to use the original syntax anymore.
>>
>> https://github.com/lampepfl/dotty/issues/2491
>>
>>
>>
>
> From the link:
>
> "Impediments
>
> What are the reasons for preferring braces over indentations?
>
> Provide visual clues where constructs end. With pure indentation based
> syntax it is sometimes hard to tell how many levels of indentation are
> terminated at some point... "
>
> I am a huge python fan (but also a C++ and Java fan) and I agree with
> Scala creator, sometimes the readability is complicated. So, more
> often than I would like to, I end up missing the braces :-O

I am the inventor of multiple ends on the same line. This way, in a
language where all of several nested constructs end with an end - not
going to name the language but it's Julia - instead of

end
end
end
end
end,

one combines the uninformative lines into one by writing

end end end end end,

and with four-space indentation the ends align neatly with the starts.
Technically, the ends on the remaining line of ends are backwards.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Scala considering significant indentation like Python

2017-05-22 Thread Cholo Lennon

On 22/05/17 00:53, Steve D'Aprano wrote:

The creator of Scala, Martin Odersky, has proposed introducing Python-like
significant indentation to Scala and getting rid of braces:

 I was playing for a while now with ways to make Scala's syntax
 indentation-based. I always admired the neatness of Python syntax
 and also found that F# has benefited greatly from its optional
 indentation-based syntax, so much so that nobody seems to use
 the original syntax anymore.

https://github.com/lampepfl/dotty/issues/2491





From the link:

"Impediments

What are the reasons for preferring braces over indentations?

Provide visual clues where constructs end. With pure indentation based 
syntax it is sometimes hard to tell how many levels of indentation are 
terminated at some point... "


I am a huge python fan (but also a C++ and Java fan) and I agree with 
Scala creator, sometimes the readability is complicated. So, more often 
than I would like to, I end up missing the braces :-O



--
Cholo Lennon
Bs.As.
ARG
--
https://mail.python.org/mailman/listinfo/python-list


Scala considering significant indentation like Python

2017-05-21 Thread Steve D'Aprano
The creator of Scala, Martin Odersky, has proposed introducing Python-like
significant indentation to Scala and getting rid of braces:

I was playing for a while now with ways to make Scala's syntax
indentation-based. I always admired the neatness of Python syntax
and also found that F# has benefited greatly from its optional
indentation-based syntax, so much so that nobody seems to use
the original syntax anymore.

https://github.com/lampepfl/dotty/issues/2491



-- 
Steve
Emoji: a small, fuzzy, indistinct picture used to replace a clear and
perfectly comprehensible word.

-- 
https://mail.python.org/mailman/listinfo/python-list