Skip to main content

Measuring Syntactic Sugar Usage in Programming Languages: An Empirical Study of C# and Java Projects

  • Conference paper

Part of the book series: Lecture Notes in Electrical Engineering ((LNEE,volume 279))

Abstract

Syntactic sugar is introduced to existing programming languages to improve their readability and brevity. There have been many debates about pros and cons of using syntactic sugar. However, it is now an integral part of programming languages. No existing work studies the usage of syntactic sugar in real-world software development. In order to fill this gap, we conducted the first empirical study to examine the usage of syntactic sugar in 20 open source software projects written in either Java or C#. Our study results show that syntactic sugar is generally used more than an corresponding feature in the wild, but there may be a limit to what syntactic sugar cannot replace an corresponding feature completely. In this paper, we make several suggestions as to why this occurs.

This is a preview of subscription content, log in via an institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   259.00
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   329.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info
Hardcover Book
USD   329.99
Price excludes VAT (USA)
  • Durable hardcover edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Foreach, in Visual Studio .NET (2003), http://msdn.microsoft.com/en-us/library/ttw7t8t6v=vs.71.aspx

  2. Foreach loop, http://en.wikipedia.org/wiki/Foreach_loop

  3. The For-Each Loop, http://docs.oracle.com/javase/1.5.0/docs/guide/language/foreach.html

  4. Myers, J., Well, A., Lorch, R.F.: Research Design and Statistical Analysis, 3rd edn. Routledge Academic (2010)

    Google Scholar 

  5. Parnin, C., Bird, C., Murphy-Hill, E.R.: Java generics adoption: how new features are introduced, championed, or ignored. In: MSR 2011: Proceedings of the 8th International Working Conference on Mining Software Repositories, pp. 3–12 (2011)

    Google Scholar 

  6. Perlis, A.J.: Epigrams in programming. ACM’s SIGPLAN Publication (September 1982)

    Google Scholar 

  7. Skeet, J.: C# in Depth, 2nd edition. Manning Publications, Stamford, CT 06901 (2010)

    Google Scholar 

  8. using Statement, http://msdn.microsoft.com/en-us/library/yh598w02v=vs.80.aspx

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Donghoon Kim .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2014 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Kim, D., Yi, G. (2014). Measuring Syntactic Sugar Usage in Programming Languages: An Empirical Study of C# and Java Projects. In: Jeong, H., S. Obaidat, M., Yen, N., Park, J. (eds) Advances in Computer Science and its Applications. Lecture Notes in Electrical Engineering, vol 279. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-41674-3_40

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-41674-3_40

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-41673-6

  • Online ISBN: 978-3-642-41674-3

  • eBook Packages: EngineeringEngineering (R0)

Publish with us

Policies and ethics