- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
scala code format
Thu, 2009-02-19, 05:50
Hi all,
Not strictly a language question but I wanted to know if there is a de-facto code formatting style for scala - or do people generally just wing it to make their code look pretty (or not, as the case might be)?
I ask because at my day job our team is very obsessive about making sure that all our Java code goes through checkstyle and we set up our IDEs to conform to the same formatting rules.
Ishaaq
Not strictly a language question but I wanted to know if there is a de-facto code formatting style for scala - or do people generally just wing it to make their code look pretty (or not, as the case might be)?
I ask because at my day job our team is very obsessive about making sure that all our Java code goes through checkstyle and we set up our IDEs to conform to the same formatting rules.
Ishaaq
Thu, 2009-02-19, 06:17
#2
Re: scala code format
I usually use 2 spaces of indentation (default eclipse value). I also try as much as possible to have a line contain max 80 characters, but I guess that's personal and also depends on your screen size.
On Wed, Feb 18, 2009 at 9:00 PM, Vlad Patryshev <vpatryshev@gmail.com> wrote:
On Wed, Feb 18, 2009 at 9:00 PM, Vlad Patryshev <vpatryshev@gmail.com> wrote:
I more or less inherit the ideas from Java; not sure about spaces between type and value parameters, and in folds, do I need a space between two parens; the rest is kind of standard (at least for a Java programmer).
2009/2/18 Ishaaq Chandy <ishaaq@gmail.com>Hi all,
Not strictly a language question but I wanted to know if there is a de-facto code formatting style for scala - or do people generally just wing it to make their code look pretty (or not, as the case might be)?
I ask because at my day job our team is very obsessive about making sure that all our Java code goes through checkstyle and we set up our IDEs to conform to the same formatting rules.
Ishaaq
--
Thanks,
-Vlad
Thu, 2009-02-19, 09:37
#3
Re: scala code format
I often use a 7" screen and it copes with 120 char-wide code. What is your monitor? A postage stamp? :)
2009/2/19 Manohar Jonnalagedda <manojo10386@gmail.com>
2009/2/19 Manohar Jonnalagedda <manojo10386@gmail.com>
I usually use 2 spaces of indentation (default eclipse value). I also try as much as possible to have a line contain max 80 characters, but I guess that's personal and also depends on your screen size.
On Wed, Feb 18, 2009 at 9:00 PM, Vlad Patryshev <vpatryshev@gmail.com> wrote:I more or less inherit the ideas from Java; not sure about spaces between type and value parameters, and in folds, do I need a space between two parens; the rest is kind of standard (at least for a Java programmer).
2009/2/18 Ishaaq Chandy <ishaaq@gmail.com>Hi all,
Not strictly a language question but I wanted to know if there is a de-facto code formatting style for scala - or do people generally just wing it to make their code look pretty (or not, as the case might be)?
I ask because at my day job our team is very obsessive about making sure that all our Java code goes through checkstyle and we set up our IDEs to conform to the same formatting rules.
Ishaaq
--
Thanks,
-Vlad
2009/2/18 Ishaaq Chandy <ishaaq@gmail.com>
--
Thanks,
-Vlad