DZone
Java Zone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
  • Refcardz
  • Trend Reports
  • Webinars
  • Zones
  • |
    • Agile
    • AI
    • Big Data
    • Cloud
    • Database
    • DevOps
    • Integration
    • IoT
    • Java
    • Microservices
    • Open Source
    • Performance
    • Security
    • Web Dev
DZone > Java Zone > Is making Boost more like Java a good idea?

Is making Boost more like Java a good idea?

Peter Lawrey user avatar by
Peter Lawrey
·
Sep. 20, 11 · Java Zone · Interview
Like (0)
Save
Tweet
5.48K Views

Join the DZone community and get the full member experience.

Join For Free

I was reading a question StackOverflow about What is Boost missing? and I was wondering how many of these features are available in Java already and whether making boost more like Java is good idea.

 

Top suggestions

SuggestionWhat is in Java
SQL supportJDBC
JSonRequires an additional library like XStream, Possibly should be in core Java
AudioJava has basic support. Don't know if it much good.
loggingLogger
callstack, a standard APIThrowable.getStackTrace() and Thread.getStackTrace()
Support for archivesSupport ZIP and JAR
Redeveloped collectionsThe same could be said for Java Collections
Standard XML parsing for UTF-8 textSAX (event driven) and DOM (Document object model) parsers for XML
Platform independent GUISwing
Concurrency with lock free collections and atomic operationsConcurrency library
Arbitrary precision floating point and decimalBigDecimal and BigInteger
Python, Ruby and Lua supportNot built in, but there is Jython, JRuby and LuaJava
High performance (sub micro-second) timersSystem.nanoTime()
Better concept supportThis looks like staticly defined duck typing and Java is a long way from having anything like this. ;)
AtomicAtomicBoolean, AtomicInteger, AtomicLong, AtomicReference, AtomicIntegerArray and AtomicLongArray
Thread poolsExecutorService and ScheduledExecutorService
RPCRMI
Character encodingCharSet
GPU supportI would love Java to have this as well. There is JoCL but its not exactly transparent or close to the Write One, Run Anywhere model.
Hashing/ChecksumsMessageDigest and CRC32
OS performance measuresThis is poor in Java. You can get the load average but its always 0 on windows.
Co-routinesThe closest is fork/join with anonymous classes. In Java 8 methods will become first class objects which is a little closer.
Fixed size stringsYou can have this in Java. However I assume the point of this is efficiency, which Java is unlikely to match, ever.
Message QueuesJMS
cryptographyJava SE Security
Extend GC to trigger a GC and handle when an object is cleaned up.System.gc(), finaliser() and PhantomReferences
A overflow/underflow safe integerThis would be useful if language support was included, but I doubt that will happen, (like unsigned int)
unification and backtrackingThis could be added in the far future. I imagine after Java 8
SingletonsAn enum with one instance (enum are Objects in Java not int values)
A Persistent Collections Library.Java doesn't have much support for functional programming. This is something which it could have, but I don't imagine it being any time soon.

IMHO, The best suggestions which are missing or could be better in Java are

 

  • persisted collections
  • JSon serializaton/deserialization
  • GPU support
  • Good OS performance measures

Even more useful would be a common interface and basic support for collections which are distributed and persisted. e.g. standardised/simplified Hazelcast, Terracotta and Hibernate. @Vyadh points out this is not what is meant by a persisted collection in functional programming

 

Last thoughts

While I really like Java, but I have never looked at C++ & Boost and thought; if only it were more like Java. (Some of the limitations of the C syntax are a bit backward IMHO) I have thought this about the refactoring tools in IDEs e.g extracting a method from a body of code (and have it replace any duplicates)

Is making C++ & Boost more like the relatively heavy weight Java a good thing? Or is it better to use a language for it strengths?

 

From http://vanillajava.blogspot.com/2011/09/is-making-boost-more-like-java-good.html

Java (programming language) Boost (C++ libraries)

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Common Types Of Network Security Vulnerabilities In 2022
  • Secure Your WSO2 Micro Integrator Deployment
  • Demystifying Cloud-Native Data Management: Layers of Operation
  • How BDD Works Well With EDA

Comments

Java Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • MVB Program
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends:

DZone.com is powered by 

AnswerHub logo