[Year 12 SofDev] arrays of mixed data types
Young, Katherine A
young.katherine.a at edumail.vic.gov.au
Fri Jun 12 14:41:09 AEST 2015
Hi all,
My understanding of the technical difference between an array and a list is that an array is allocated consecutive bytes of memory when a program is compiled, and therefore must have a predefined maximum size - as determined by the data type. Conversely a list is a series of linked pointers to memory addresses which are not allocated until the program executes and can therefore be of undetermined size until runtime.
Arrays have space overheads, whereas lists have processing overheads.
The most appropriate/efficient choice depends on the characteristics of the data a given program will handle.
Regards,
[cid:9E5109AF-9726-4BE7-B3EE-B1896EDA6F52]
Katherine Young
11C Mentor
Mathematics & Information Technology Teacher
Castlemaine Secondary College
Etty Street Campus
Etty Street
Castlemaine VIC 3450
T: (03) 5479 4222 | F: (03) 5479 4230
On Jun 12, 2015, at 2:26 PM, sofdev-request at edulists.com.au<mailto:sofdev-request at edulists.com.au> wrote:
Send sofdev mailing list submissions to
sofdev at edulists.com.au<mailto:sofdev at edulists.com.au>
To subscribe or unsubscribe via the World Wide Web, visit
http://www.edulists.com.au/mailman/listinfo/sofdev
or, via email, send a message with subject or body 'help' to
sofdev-request at edulists.com.au
You can reach the person managing the list at
sofdev-owner at edulists.com.au
When replying, please edit your Subject line so it is more specific
than "Re: Contents of sofdev digest..."
Today's Topics:
1. Arrays with mixed data types (Mark)
2. Re: Arrays with mixed data types (Laurie Savage)
3. Re: Arrays with mixed data types (Laurie Savage)
4. Re: Arrays with mixed data types (Mark)
----------------------------------------------------------------------
Message: 1
Date: Fri, 12 Jun 2015 13:27:54 +1000
From: Mark <mark at vceit.com>
Subject: [Year 12 SofDev] Arrays with mixed data types
To: "Year 12 Software Development Teachers' Mailing List"
<sofdev at edulists.com.au>
Message-ID:
<CACu=8Z1oLGfq7vxvBhgM4k7_NzR8E8ghpv8w2Jf3TxoD07DZ-g at mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
Hi, codemakers.
Most languages require all elements of an array to have a single data type,
but I have a nagging suspicion that there is an exception or two.
e.g. Apparently PHP allows mixed data types in its 'arrays' but I believe
PHP 'arrays' are actually more like the lists found in Perl or Python and
so are not classical arrays.
Is there a language that allows true arrays with mixed data types?
Cheers
Mark
--
Before Facebook, how many people would take a picture of their dinner on a
disposable camera, get the photos developed, then go round to your friends'
houses and show them all the photo?
--
Mark Kelly
http://vceit.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.edulists.com.au/pipermail/sofdev/attachments/20150612/976c592f/attachment-0001.html
------------------------------
Message: 2
Date: Fri, 12 Jun 2015 14:09:17 +1000
From: Laurie Savage <08327998 at pvgc.vic.edu.au>
Subject: Re: [Year 12 SofDev] Arrays with mixed data types
To: "Year 12 Software Development Teachers' Mailing List"
<sofdev at edulists.com.au>
Message-ID:
<CAPrMnR-XT_g3jfn2N=18v2Z30VCxEsrSmhtibdFODBJLLPdPDA at mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
If it quacks like an array ...? Could you elaborate on why Python lists
ain't arrayz?
Laurie
Laurie Savage
https://sites.google.com/a/pvgc.vic.edu.au/mr-savage/home
On 12 June 2015 at 13:27, Mark <mark at vceit.com> wrote:
Hi, codemakers.
Most languages require all elements of an array to have a single data
type, but I have a nagging suspicion that there is an exception or two.
e.g. Apparently PHP allows mixed data types in its 'arrays' but I believe
PHP 'arrays' are actually more like the lists found in Perl or Python and
so are not classical arrays.
Is there a language that allows true arrays with mixed data types?
Cheers
Mark
--
Before Facebook, how many people would take a picture of their dinner on a
disposable camera, get the photos developed, then go round to your friends'
houses and show them all the photo?
--
Mark Kelly
http://vceit.com
_______________________________________________
http://www.edulists.com.au - FAQ, Subscribe, Unsubscribe
IT Software Development Mailing List kindly supported by
http://www.vcaa.vic.edu.au - Victorian Curriculum and Assessment
Authority and
http://www.vcaa.vic.edu.au/vce/studies/infotech/softwaredevel3-4.html
http://www.vitta.org.au - VITTA Victorian Information Technology
Teachers Association Inc
http://www.swinburne.edu.au/ict/schools - Swinburne University
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.edulists.com.au/pipermail/sofdev/attachments/20150612/94a2e9c3/attachment-0001.html
------------------------------
Message: 3
Date: Fri, 12 Jun 2015 14:10:59 +1000
From: Laurie Savage <08327998 at pvgc.vic.edu.au>
Subject: Re: [Year 12 SofDev] Arrays with mixed data types
To: "Year 12 Software Development Teachers' Mailing List"
<sofdev at edulists.com.au>
Message-ID:
<CAPrMnR9U-tjfXPMAZETQMV-FkdOcM=s=bmT=c9v86VTVG3EDcg at mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
Lisp?
Laurie Savage
https://sites.google.com/a/pvgc.vic.edu.au/mr-savage/home
On 12 June 2015 at 14:09, Laurie Savage <08327998 at pvgc.vic.edu.au> wrote:
If it quacks like an array ...? Could you elaborate on why Python lists
ain't arrayz?
Laurie
Laurie Savage
https://sites.google.com/a/pvgc.vic.edu.au/mr-savage/home
On 12 June 2015 at 13:27, Mark <mark at vceit.com> wrote:
Hi, codemakers.
Most languages require all elements of an array to have a single data
type, but I have a nagging suspicion that there is an exception or two.
e.g. Apparently PHP allows mixed data types in its 'arrays' but I believe
PHP 'arrays' are actually more like the lists found in Perl or Python and
so are not classical arrays.
Is there a language that allows true arrays with mixed data types?
Cheers
Mark
--
Before Facebook, how many people would take a picture of their dinner on
a disposable camera, get the photos developed, then go round to your
friends' houses and show them all the photo?
--
Mark Kelly
http://vceit.com
_______________________________________________
http://www.edulists.com.au - FAQ, Subscribe, Unsubscribe
IT Software Development Mailing List kindly supported by
http://www.vcaa.vic.edu.au - Victorian Curriculum and Assessment
Authority and
http://www.vcaa.vic.edu.au/vce/studies/infotech/softwaredevel3-4.html
http://www.vitta.org.au - VITTA Victorian Information Technology
Teachers Association Inc
http://www.swinburne.edu.au/ict/schools - Swinburne University
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.edulists.com.au/pipermail/sofdev/attachments/20150612/f4f65b36/attachment-0001.html
------------------------------
Message: 4
Date: Fri, 12 Jun 2015 14:25:58 +1000
From: Mark <mark at vceit.com>
Subject: Re: [Year 12 SofDev] Arrays with mixed data types
To: "Year 12 Software Development Teachers' Mailing List"
<sofdev at edulists.com.au>
Message-ID:
<CACu=8Z3GTqUEWXwA=iEZ75mDE=7g_aghLejpWu87xE8tdPn81A at mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
I'm not familiar with the inner workings of PHP, but my research suggests
their 'arrays' are not exactly the same nature as most other languages.
It's sort of like when TV guides categorise 'Big Brother' as
'entertainment' ... a non-classical use of the term.
I ask because I'm writing an exam with a question about whether a 2D array
with mixed data types is possible (or wise).
Cheers
Mark
On 12 June 2015 at 14:09, Laurie Savage <08327998 at pvgc.vic.edu.au> wrote:
If it quacks like an array ...? Could you elaborate on why Python lists
ain't arrayz?
Laurie
Laurie Savage
https://sites.google.com/a/pvgc.vic.edu.au/mr-savage/home
On 12 June 2015 at 13:27, Mark <mark at vceit.com> wrote:
Hi, codemakers.
Most languages require all elements of an array to have a single data
type, but I have a nagging suspicion that there is an exception or two.
e.g. Apparently PHP allows mixed data types in its 'arrays' but I believe
PHP 'arrays' are actually more like the lists found in Perl or Python and
so are not classical arrays.
Is there a language that allows true arrays with mixed data types?
Cheers
Mark
--
Before Facebook, how many people would take a picture of their dinner on
a disposable camera, get the photos developed, then go round to your
friends' houses and show them all the photo?
--
Mark Kelly
http://vceit.com
_______________________________________________
http://www.edulists.com.au - FAQ, Subscribe, Unsubscribe
IT Software Development Mailing List kindly supported by
http://www.vcaa.vic.edu.au - Victorian Curriculum and Assessment
Authority and
http://www.vcaa.vic.edu.au/vce/studies/infotech/softwaredevel3-4.html
http://www.vitta.org.au - VITTA Victorian Information Technology
Teachers Association Inc
http://www.swinburne.edu.au/ict/schools - Swinburne University
_______________________________________________
http://www.edulists.com.au - FAQ, Subscribe, Unsubscribe
IT Software Development Mailing List kindly supported by
http://www.vcaa.vic.edu.au - Victorian Curriculum and Assessment
Authority and
http://www.vcaa.vic.edu.au/vce/studies/infotech/softwaredevel3-4.html
http://www.vitta.org.au - VITTA Victorian Information Technology
Teachers Association Inc
http://www.swinburne.edu.au/ict/schools - Swinburne University
--
Witty sig goes HERE <<
Mark Kelly
http://vceit.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.edulists.com.au/pipermail/sofdev/attachments/20150612/acd22574/attachment.html
------------------------------
_______________________________________________
sofdev mailing list
sofdev at edulists.com.au
http://www.edulists.com.au/mailman/listinfo/sofdev
End of sofdev Digest, Vol 123, Issue 22
***************************************
Important - This email and any attachments may be confidential. If received in error, please contact us and delete all copies. Before opening or using attachments check them for viruses and defects. Regardless of any loss, damage or consequence, whether caused by the negligence of the sender or not, resulting directly or indirectly from the use of any attached files our liability is limited to resupplying any affected attachments. Any representations or opinions expressed are those of the individual sender, and not necessarily those of the Department of Education and Training.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.edulists.com.au/pipermail/sofdev/attachments/20150612/69fd468f/attachment-0001.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Kate.jpg
Type: image/jpeg
Size: 14827 bytes
Desc: Kate.jpg
Url : http://www.edulists.com.au/pipermail/sofdev/attachments/20150612/69fd468f/Kate-0001.jpg
More information about the sofdev
mailing list