许多人所提倡的一条经验法则是,类的代码行超过1,000行就可以说该类太长了。
A rule of thumb advocated by many is that a class with more than 1,000 lines of code is too big.
line -break选项对于分离文件可能是重要的,因此这一行不能太长。
The — line-break option may be important for breaking up files so that the lines do not become too long.
当一个声明或者表达式太长,一行不够的时候,Scala通常可以推断你在什么时候要在下一行继续,就像这个例子中一样。
When a statement or expression is too long for one line, Scala can usually infer when you are continuing on to the next line, as shown in this example.
就我而言,截止点(cutoff point)大约是50行代码,但有些开发人员会说,如果某一方法需要您向下滚动整整一天才能看完,那么该方法太长了。
For me, the cutoff point is more like 50 lines of code, whereas some developers would say that a method is too long if it requires you to scroll down to see its entire body.
第二,如果字符串用一行表示太长,您可以使用Python连续字符:反斜线 (\) 来对字符串进行折行。
Second, if a string is too long for a single line, you can wrap the string using the Python continuation character: the backslash (\).
第二,如果字符串用一行表示太长,您可以使用Python连续字符:反斜线 (\) 来对字符串进行折行。
Second, if a string is too long for a single line, you can wrap the string using the Python continuation character: the backslash (\).
应用推荐