Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Concatenation with Plus operator should only work with numbers #897

Closed
DartBot opened this issue Dec 17, 2011 · 8 comments
Closed

Concatenation with Plus operator should only work with numbers #897

DartBot opened this issue Dec 17, 2011 · 8 comments
Assignees
Labels
area-language Dart language related items (some items might be better tracked at github.com/dart-lang/language). type-enhancement A request for a change that isn't a bug

Comments

@DartBot
Copy link

DartBot commented Dec 17, 2011

This issue was originally filed by jesse.rose2...@gmail.com


Since Dart has string interpolation, you could remove the + operator use of string concatenation which is a common source of bugs. This feature only work well in static languages.

Doug Crockford is less kind on this feature in JavaScript so I know I'm not nuts.

This a golden opportunity to remove it and train programmers to use a better string interpolation method which shows clear intent.

@dgrove
Copy link
Contributor

dgrove commented Dec 19, 2011

Removed Type-Defect label.
Added Type-Enhancement, Area-Language labels.

@dgrove
Copy link
Contributor

dgrove commented Dec 19, 2011

Added Triaged label.

@gbracha
Copy link
Contributor

gbracha commented Dec 20, 2011

While I agree with Doug (and I don't think it works well in statically typed settings either), it is a common practice and its absence would catch many programmers by surprise. So I'm not optimistic about this particular cleanup.


Added Accepted label.

@gbracha
Copy link
Contributor

gbracha commented Dec 20, 2011

Set owner to @gbracha.

@DartBot
Copy link
Author

DartBot commented Dec 21, 2011

This comment was originally written by jesse.r...@gmail.com


I know but it I thought it was worth trying.

@gbracha
Copy link
Contributor

gbracha commented Mar 6, 2012

Wonders never cease. We are getting rid of + on Strings. Coming in the 0.08 spec


Added Done label.

@DartBot
Copy link
Author

DartBot commented Mar 7, 2012

This comment was originally written by jesse.rose28...@gmail.com


I can now die and go to heaven. Great job !!!

@DartBot
Copy link
Author

DartBot commented Jan 10, 2014

This comment was originally written by marcellaodob...@gmail.com


So I can blame you on It.
It would be better to use another operator like Lua does with ¨.
Using an StringBuffer Object inside a loop is Ugly ,Verbose and completely violates the concept of being familiar,clean,not verbose, and so on.

@DartBot DartBot added Type-Enhancement area-language Dart language related items (some items might be better tracked at github.com/dart-lang/language). labels Jan 10, 2014
@kevmoo kevmoo added type-enhancement A request for a change that isn't a bug and removed type-enhancement labels Mar 1, 2016
copybara-service bot pushed a commit that referenced this issue Nov 1, 2023
…, convert, crypto, csslib, ecosystem, ffi, file, fixnum, html, http, lints, logging, markdown, matcher, mime, native, path, pool, protobuf, pub_semver, shelf, source_map_stack_trace, source_maps, source_span, sse, stack_trace, stream_channel, string_scanner, term_glyph, test_descriptor, test_process, test_reflective_loader, tools, typed_data, watcher, web_socket_channel, webdriver, webkit_inspection_protocol, yaml, yaml_edit

Revisions updated by `dart tools/rev_sdk_deps.dart`.

async (https://github.com/dart-lang/async/compare/def4482..9924570):
  9924570  2023-11-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#255)
  61cdb0f  2023-11-01  dependabot[bot]  Bump actions/checkout from 4.1.0 to 4.1.1 (#254)

boolean_selector (https://github.com/dart-lang/boolean_selector/compare/479e1c1..7f523c3):
  7f523c3  2023-11-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#53)
  1ed2941  2023-11-01  dependabot[bot]  Bump actions/checkout from 4.1.0 to 4.1.1 (#54)

browser_launcher (https://github.com/dart-lang/browser_launcher/compare/c2871b2..4f9e784):
  4f9e784  2023-11-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#51)
  706c031  2023-11-01  dependabot[bot]  Bump actions/checkout from 4.1.0 to 4.1.1 (#52)

cli_util (https://github.com/dart-lang/cli_util/compare/56c1235..500dffa):
  500dffa  2023-11-01  dependabot[bot]  Bump actions/checkout from 4.1.0 to 4.1.1 (#91)
  c66e201  2023-11-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#92)

clock (https://github.com/dart-lang/clock/compare/200a020..f975668):
  f975668  2023-11-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#59)
  eb5d2f5  2023-11-01  dependabot[bot]  Bump actions/checkout from 4.1.0 to 4.1.1 (#58)

convert (https://github.com/dart-lang/convert/compare/03242b2..f24afa7):
  f24afa7  2023-11-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#89)
  a3e9bc5  2023-11-01  dependabot[bot]  Bump actions/checkout from 4.1.0 to 4.1.1 (#90)

crypto (https://github.com/dart-lang/crypto/compare/36ead7c..f3e64d2):
  f3e64d2  2023-11-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#155)
  7a7b517  2023-11-01  dependabot[bot]  Bump actions/checkout from 4.1.0 to 4.1.1 (#156)

csslib (https://github.com/dart-lang/csslib/compare/f6b68dd..17346e5):
  17346e5  2023-11-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#191)
  4bdc553  2023-11-01  dependabot[bot]  Bump actions/checkout from 4.1.0 to 4.1.1 (#192)

ecosystem (https://github.com/dart-lang/ecosystem/compare/4acfcaf..dda7886):
  dda7886  2023-11-01  dependabot[bot]  Bump peter-evans/create-or-update-comment (#192)
  b681c56  2023-11-01  dependabot[bot]  Bump actions/checkout from 4.1.0 to 4.1.1 (#193)
  0d768d4  2023-11-01  dependabot[bot]  Bump subosito/flutter-action from 2.10.0 to 2.12.0 (#190)
  178d244  2023-11-01  dependabot[bot]  Bump actions/github-script (#194)
  4b3e572  2023-11-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#191)

ffi (https://github.com/dart-lang/ffi/compare/2faec28..c926657):
  c926657  2023-11-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#219)
  3181ec0  2023-11-01  dependabot[bot]  Bump actions/checkout from 4.1.0 to 4.1.1 (#220)

file (https://github.com/google/file.dart/compare/7418131..e7c03aa):
  e7c03aa  2023-11-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.5.0 to 1.6.0 (#233)

fixnum (https://github.com/dart-lang/fixnum/compare/ef45eb5..3279f5d):
  3279f5d  2023-11-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#120)
  4913894  2023-11-01  dependabot[bot]  Bump actions/checkout from 4.1.0 to 4.1.1 (#121)

html (https://github.com/dart-lang/html/compare/49e2c8e..06bc148):
  06bc148  2023-11-01  dependabot[bot]  Bump actions/checkout from 4.1.0 to 4.1.1 (#232)
  2630607  2023-11-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#233)

http (https://github.com/dart-lang/http/compare/7240d0a..b9389fe):
  b9389fe  2023-11-01  dependabot[bot]  Bump futureware-tech/simulator-action from 2 to 3 (#1037)
  d7c36ae  2023-11-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#1038)

lints (https://github.com/dart-lang/lints/compare/5c60f48..f58fd77):
  f58fd77  2023-11-01  dependabot[bot]  Bump actions/checkout from 4.1.0 to 4.1.1 (#168)

logging (https://github.com/dart-lang/logging/compare/642ed21..324a0b5):
  324a0b5  2023-11-01  dependabot[bot]  Bump actions/checkout from 4.1.0 to 4.1.1 (#150)
  e9b13b7  2023-11-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#151)

markdown (https://github.com/dart-lang/markdown/compare/4e2e970..efb73b3):
  efb73b3  2023-11-01  dependabot[bot]  Bump actions/checkout from 4.1.0 to 4.1.1 (#561)
  2e4a3bc  2023-11-01  dependabot[bot]  Bump subosito/flutter-action from 2.10.0 to 2.11.0 (#559)
  22e378b  2023-11-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#560)

matcher (https://github.com/dart-lang/matcher/compare/7512f80..3d03fa1):
  3d03fa1  2023-11-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#231)
  b7d24c8  2023-11-01  dependabot[bot]  Bump actions/checkout from 4.1.0 to 4.1.1 (#232)

mime (https://github.com/dart-lang/mime/compare/af3e5fe..8ebf946):
  8ebf946  2023-11-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#108)
  4328d32  2023-11-01  dependabot[bot]  Bump actions/checkout from 4.1.0 to 4.1.1 (#107)

native (https://github.com/dart-lang/native/compare/279094d..de9d59e):
  de9d59e  2023-11-01  Daco Harkes  [infra] Fix PR publisher comments (#177)
  22b6b24  2023-11-01  Daco Harkes  [infra] Rename `dart.yaml` to `native.yaml` (#176)
  cc42fb1  2023-11-01  Daco Harkes  [native_toolchain_c] Use sysroot on Android (#180)
  01d92b0  2023-11-01  Daco Harkes  [native_toolchain_c] Bump highest tested NDK version to 34 (#182)
  53facde  2023-11-01  Daco Harkes  [native_toolchain_c] Fix NDK discovery (#179)
  285ee6c  2023-11-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#174)
  46a05e4  2023-11-01  dependabot[bot]  Bump actions/checkout from 4.1.0 to 4.1.1 (#172)
  23187fe  2023-11-01  dependabot[bot]  Bump nttld/setup-ndk from 1.3.1 to 1.4.1 (#173)

path (https://github.com/dart-lang/path/compare/4ca27d4..18ec71f):
  18ec71f  2023-11-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#153)
  f26c20c  2023-11-01  dependabot[bot]  Bump actions/checkout from 4.1.0 to 4.1.1 (#154)

pool (https://github.com/dart-lang/pool/compare/5ccef15..c78cef4):
  c78cef4  2023-11-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#76)

protobuf (https://github.com/dart-lang/protobuf/compare/3f567b2..dcec2ed):
  dcec2ed  2023-10-31  Ömer Sinan Ağacan  Annotate deepCopy with @useResult (#897)

pub_semver (https://github.com/dart-lang/pub_semver/compare/8e5a58f..f9e94ee):
  f9e94ee  2023-11-01  dependabot[bot]  Bump actions/checkout from 4.1.0 to 4.1.1 (#95)
  81fdbcf  2023-11-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#94)

shelf (https://github.com/dart-lang/shelf/compare/c15fc6f..b3adc7c):
  b3adc7c  2023-11-01  dependabot[bot]  Bump actions/checkout from 4.1.0 to 4.1.1 (#391)
  baea52d  2023-11-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#392)

source_map_stack_trace (https://github.com/dart-lang/source_map_stack_trace/compare/73d449c..2209626):
  2209626  2023-11-01  dependabot[bot]  Bump actions/checkout from 4.1.0 to 4.1.1 (#45)
  bfa3949  2023-11-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#44)

source_maps (https://github.com/dart-lang/source_maps/compare/fc6aa16..87dc587):
  87dc587  2023-11-01  dependabot[bot]  Bump actions/checkout from 4.1.0 to 4.1.1 (#84)
  33ba11d  2023-11-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#85)

source_span (https://github.com/dart-lang/source_span/compare/92e50bf..ed16e0d):
  ed16e0d  2023-11-01  dependabot[bot]  Bump actions/checkout from 4.1.0 to 4.1.1 (#105)
  aacd748  2023-11-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#104)

sse (https://github.com/dart-lang/sse/compare/37df57d..8ddb95f):
  8ddb95f  2023-11-01  dependabot[bot]  Bump actions/checkout from 4.1.0 to 4.1.1 (#95)
  8830125  2023-11-01  dependabot[bot]  Bump nanasess/setup-chromedriver from 2.2.0 to 2.2.1 (#94)
  86dd8f9  2023-11-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#93)

stack_trace (https://github.com/dart-lang/stack_trace/compare/634589f..6496ff8):
  6496ff8  2023-11-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#145)
  3d60304  2023-11-01  dependabot[bot]  Bump actions/checkout from 4.1.0 to 4.1.1 (#144)

stream_channel (https://github.com/dart-lang/stream_channel/compare/ffdb208..178104d):
  178104d  2023-11-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#98)
  1193387  2023-11-01  dependabot[bot]  Bump actions/checkout from 4.1.0 to 4.1.1 (#97)

string_scanner (https://github.com/dart-lang/string_scanner/compare/9c525f7..a7105ef):
  a7105ef  2023-11-01  dependabot[bot]  Bump actions/checkout from 4.1.0 to 4.1.1 (#65)
  f33ca6f  2023-11-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#66)

term_glyph (https://github.com/dart-lang/term_glyph/compare/cff80de..7c1eb9d):
  7c1eb9d  2023-11-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#45)
  39073ca  2023-11-01  dependabot[bot]  Bump actions/checkout from 4.1.0 to 4.1.1 (#44)

test_descriptor (https://github.com/dart-lang/test_descriptor/compare/55b5eac..c417cbb):
  c417cbb  2023-11-01  dependabot[bot]  Bump actions/checkout from 4.1.0 to 4.1.1 (#59)
  dcfde39  2023-11-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#58)

test_process (https://github.com/dart-lang/test_process/compare/d610333..c21e40d):
  c21e40d  2023-11-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#51)
  bfd0576  2023-11-01  dependabot[bot]  Bump actions/checkout from 4.1.0 to 4.1.1 (#50)

test_reflective_loader (https://github.com/dart-lang/test_reflective_loader/compare/8593eb1..17d40bb):
  17d40bb  2023-11-01  dependabot[bot]  Bump actions/checkout from 4.1.0 to 4.1.1 (#54)
  e664092  2023-11-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#55)

tools (https://github.com/dart-lang/tools/compare/01c0b52..dd91cb6):
  dd91cb6  2023-11-01  dependabot[bot]  Bump actions/checkout from 4.1.0 to 4.1.1 (#192)
  603b012  2023-11-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#191)

typed_data (https://github.com/dart-lang/typed_data/compare/d1c15ed..0b16bd2):
  0b16bd2  2023-11-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#76)
  f869102  2023-11-01  dependabot[bot]  Bump actions/checkout from 4.1.0 to 4.1.1 (#77)

watcher (https://github.com/dart-lang/watcher/compare/6ad58dc..b2b278a):
  b2b278a  2023-11-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#154)
  97e9637  2023-11-01  dependabot[bot]  Bump actions/checkout from 4.1.0 to 4.1.1 (#155)

web_socket_channel (https://github.com/dart-lang/web_socket_channel/compare/f3ac1bf..82ac73f):
  82ac73f  2023-11-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#289)
  3615850  2023-11-01  dependabot[bot]  Bump actions/checkout from 4.1.0 to 4.1.1 (#290)

webdriver (https://github.com/google/webdriver.dart/compare/eaf9c58..43ed1db):
  43ed1db  2023-11-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#289)
  02fd658  2023-11-01  dependabot[bot]  Bump actions/checkout from 4.1.0 to 4.1.1 (#288)
  8828360  2023-11-01  dependabot[bot]  Bump nanasess/setup-chromedriver from 2.2.0 to 2.2.1 (#287)

webkit_inspection_protocol (https://github.com/google/webkit_inspection_protocol.dart/compare/82f0c1c..2c6f8b6):
  2c6f8b6  2023-11-01  dependabot[bot]  Bump actions/checkout from 3.6.0 to 4.1.1 (#114)
  d4e4d55  2023-11-01  dependabot[bot]  Bump nanasess/setup-chromedriver from 2.2.0 to 2.2.1 (#115)

yaml (https://github.com/dart-lang/yaml/compare/9f0d649..98a3aab):
  98a3aab  2023-11-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#154)
  b63372b  2023-11-01  dependabot[bot]  Bump actions/checkout from 4.1.0 to 4.1.1 (#155)

yaml_edit (https://github.com/dart-lang/yaml_edit/compare/a7e7fba..9b9d33c):
  9b9d33c  2023-11-01  dependabot[bot]  Bump actions/checkout from 4.1.0 to 4.1.1 (#61)
  b71c2e8  2023-11-01  dependabot[bot]  Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#60)

Change-Id: I8b663f536d4e80728c6570372d886edfef227cf1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/333059
Auto-Submit: Devon Carew <devoncarew@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-language Dart language related items (some items might be better tracked at github.com/dart-lang/language). type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

5 participants