# Scala... really?

> I am not writing this to jump all over Big Jim&#x27;s post but after reading it and seeing the syntax of Scala (and Java), I can&#x27;t help but wonder, why anyone would…

I am not writing this to jump all over [Big Jim's post](<http://blogs.enterprisedb.com/2010/07/08/scala-postgresql-access/>) but after reading it and seeing the syntax of Scala (and Java), I can't help but wonder, why anyone would use either language (based on syntax). Yes I know it is a matter of taste and everyone has an opinion. Let's just say my taste lean toward more succinct code. 
    
    
    #!/usr/bin/python
    #
    # Set up initial work
    #
    
    import psycopg2
    conn = psycopg2.connect("dbname='postgres' user='postgres'")
    cur = conn.cursor()
    cur.execute("SELECT * FROM pg_database")
    
    def output(cur):
    #Run two queries, one for headers, one for data
        tuples = cur.fetchall()
        
        colname = [x[0] for x in cur.description]
        buff = "\t" + "\t".join(colname[0:4]) + "\n"
    
        for row in tuples:
             # This is a little one liner but could easily be expanded 
             # for readability
             buff += "\t" + "\t".join([str(i) for i in row[0:4]]) + "\n"
        return buff
    
    print output(cur)
    

I keep looking back at Java merged/derived/munged/glued languages, [Groovy](<http://http://groovy.codehaus.org/>) looks interesting and of course there is [Jython](<http://www.jython.org/>) but I think I will stick with good old fashion CPython just as I am sure that [MST](<http://www.shadowcat.co.uk/blog/matt-s-trout/>) will stick with Perl.

---
[View this page online](https://www.commandprompt.com/blog/scala_really/)